WFCUCompositeBaseCell.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // WFCUCompositeBaseCell.h
  3. // WFChatUIKit
  4. //
  5. // Created by Tom Lee on 2020/10/4.
  6. // Copyright © 2020 WildFireChat. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class WFCCMessage;
  10. NS_ASSUME_NONNULL_BEGIN
  11. #define COMPOSITE_CELL_PORTRAIT_WIDTH 48
  12. #define COMPOSITE_CELL_PORTRAIT_PADDING 16
  13. #define COMPOSITE_CELL_TOP_PADDING 12
  14. #define COMPOSITE_CELL_BUTTOM_PADDING 8
  15. #define COMPOSITE_CELL_RIGHT_PADDING 12
  16. #define COMPOSITE_CELL_NAME_LABEL_HEIGHT 20
  17. #define COMPOSITE_CELL_NAME_LABEL_FONT 14
  18. #define COMPOSITE_CELL_TIME_LABEL_WIDTH 80
  19. #define COMPOSITE_CELL_TIME_LABEL_HEIGHT 20
  20. #define COMPOSITE_CELL_TIME_LABEL_FONT 12
  21. #define COMPOSITE_CELL_NAME_CONTENT_PADDING 8
  22. #define COMPOSITE_CELL_LINE_HEIGHT 1
  23. @interface WFCUCompositeBaseCell : UITableViewCell
  24. + (instancetype)cellOfMessage:(WFCCMessage *)message;
  25. + (CGFloat)heightForMessage:(WFCCMessage *)message;
  26. //子类需要实现这个方法来计算内容区大小
  27. + (CGFloat)heightForMessageContent:(WFCCMessage *)message;
  28. @property(nonatomic, strong)WFCCMessage *message;
  29. @property(nonatomic, assign)BOOL hiddenPortrait;
  30. @property(nonatomic, assign)BOOL lastMessage;
  31. + (CGRect)contentFrame;
  32. @end
  33. NS_ASSUME_NONNULL_END