TUIFaceVerticalView.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //
  2. // TUIFaceVerticalView.h
  3. // TUIChat
  4. //
  5. // Created by wyl on 2023/11/16.
  6. // Copyright © 2023 Tencent. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "TUIFaceView.h"
  10. @class TUIFaceVerticalView;
  11. @protocol TUIFaceVerticalViewDelegate <TUIFaceViewDelegate>
  12. - (void)faceViewClickSendMessageBtn;
  13. @end
  14. @interface TUIFaceVerticalView : UIView
  15. /**
  16. * Line view
  17. * The separtor which distinguish emoticons from other views
  18. */
  19. @property(nonatomic, strong) UIView *lineView;
  20. /**
  21. * The collectionView of emoticon view
  22. * Contains multiple lines of expressions, and cooperates with faceFlowLayout for flexible and unified view layout.
  23. */
  24. @property(nonatomic, strong) UICollectionView *faceCollectionView;
  25. /**
  26. * The flow layout of @faceCollectionView
  27. * Cooperating with faceCollectionView to make the expression view more beautiful. Supported setting layout direction, line spacing, cell spacing, etc.
  28. */
  29. @property(nonatomic, strong) UICollectionViewFlowLayout *faceFlowLayout;
  30. /**
  31. *
  32. * The data of @faceView
  33. * The object stored in this NSMutableArray is TUIFaceGroup, that is, the expression group.
  34. */
  35. @property(nonatomic, strong, readonly) NSMutableArray *faceGroups;
  36. @property(nonatomic, strong, readonly) NSMutableArray *sectionIndexInGroup;
  37. @property(nonatomic, strong, readonly) NSMutableArray *groupIndexInSection;
  38. @property(nonatomic, strong, readonly) NSMutableDictionary *itemIndexs;
  39. @property(nonatomic, strong, readonly) UIView *floatCtrlView;
  40. /**
  41. *
  42. * Delegate variable, delegated
  43. * Need to implement the functionality required in the @TUIFaceVerticalViewDelegate protocol.
  44. */
  45. @property(nonatomic, weak) id<TUIFaceVerticalViewDelegate> delegate;
  46. /**
  47. * Swipe to the specified expression group.
  48. * Switch the emoticon group according to the subscript of the emoticon group clicked by the user.
  49. *
  50. * @param index The index of the destination group, starting from 0.
  51. */
  52. - (void)scrollToFaceGroupIndex:(NSInteger)index;
  53. /**
  54. * Setting data
  55. * Used to initialize TUIFaceView or update data in faceView when needed.
  56. *
  57. * @param data The data that needs to be set (TUIFaceGroup). The object stored in this NSMutableArray is TUIFaceGroup, that is, the emoticon group.
  58. */
  59. - (void)setData:(NSMutableArray *)data;
  60. - (void)setFloatCtrlViewAllowSendSwitch:(BOOL)isAllow;
  61. @end