MOLiveMsgBaseCell.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. //
  2. // MOLiveMsgBaseCell.h
  3. // MiMoLive
  4. //
  5. // Created by SuperC on 2023/11/19.
  6. //
  7. #define MOLiveMsgBaseCell_ID @"MOLiveMsgBaseCell_ID" //复用id
  8. //消息文本的宽度 8.0为背景左间距 104.0为背景右间距 5.0为自身距离背景视图的左右间距
  9. #define MOLiveMsgLeftSpacing 8.0
  10. #define MOLiveMsgRightSpacing 104.0
  11. #define MOBgViewMaxWidth (SCREENWIDTH - MOLiveMsgLeftSpacing - MOLiveMsgRightSpacing - MOContentOffSet * 2.0)
  12. #define MOBgViewMinWidth 30.0
  13. #define MOBgViewOffSet 2.0 //背景View上下间距
  14. #define MOContentOffSet 2.0 //内容View上下间距
  15. #define MOContentLeftAndRighSpacing 0.0 //内容左右间距
  16. #define MOContentBaseLeftSpacing 8.0
  17. #define MOContentBaseRightSpacing 4.0
  18. #define MOContentBaseTopSpcing 4.0
  19. #define MOContentBaseBottomSpcing 3.0
  20. #define MONormalBlueFixSpacing 4.0
  21. #define MONormalBgViewColor [MOTools colorWithHexString:@"#000000" alpha:0.2]
  22. #define MORtmCellMixHeight 28.0 //Rtm最小高度
  23. #define MORtmContentMixHeight 20.0 //Rtm最小高度
  24. #import <UIKit/UIKit.h>
  25. #import "MOMsgContentTextView.h"
  26. NS_ASSUME_NONNULL_BEGIN
  27. @interface MOLiveMsgBaseCell : UITableViewCell
  28. @property (nonatomic, strong) UIView *bgView;
  29. @property (nonatomic, strong) UIImageView *bubbleImgView;
  30. @property (nonatomic, strong) MOMsgContentTextView *contentTextView;
  31. @property (nonatomic, strong) MORtmEntity *cellModel;
  32. /** 气泡的点击手势(可以根据需要将这个手势从视图中移除或禁止) */
  33. @property (nonatomic, strong, readonly) UITapGestureRecognizer *bubbleTapGestureRecognizer;
  34. /** 气泡的长按手势(可以根据需要将这个手势从视图中移除或禁止) */
  35. @property (nonatomic, strong, readonly) UILongPressGestureRecognizer *bubbleLongPressGestureRecognizer;
  36. /** cell 单击事件 */
  37. @property (nonatomic, copy) void(^cellTapBlock)(MORtmEntity *cellModel);
  38. /** cell 长按事件 */
  39. @property (nonatomic, copy) void(^cellLongPressBlock)(MORtmEntity *cellModel);
  40. @end
  41. NS_ASSUME_NONNULL_END