WFCUMessageCellBase.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // MessageCellBase.h
  3. // WFChat UIKit
  4. //
  5. // Created by WF Chat on 2017/9/1.
  6. // Copyright © 2017年 WildFireChat. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "WFCUMessageModel.h"
  10. @class WFCUMessageCellBase;
  11. @protocol WFCUMessageCellDelegate <NSObject>
  12. - (void)didTapMessageCell:(WFCUMessageCellBase *)cell withModel:(WFCUMessageModel *)model;
  13. - (void)didTapMessagePortrait:(WFCUMessageCellBase *)cell withModel:(WFCUMessageModel *)model;
  14. - (void)didLongPressMessageCell:(WFCUMessageCellBase *)cell withModel:(WFCUMessageModel *)model;
  15. - (void)didLongPressMessagePortrait:(WFCUMessageCellBase *)cell withModel:(WFCUMessageModel *)model;
  16. - (void)didTapResendBtn:(WFCUMessageModel *)model;
  17. - (void)didSelectUrl:(WFCUMessageCellBase *)cell withModel:(WFCUMessageModel *)model withUrl:(NSString *)urlString;
  18. - (void)didSelectPhoneNumber:(WFCUMessageCellBase *)cell withModel:(WFCUMessageModel *)model withPhoneNumber:(NSString *)phoneNumber;
  19. - (void)reeditRecalledMessage:(WFCUMessageCellBase *)cell withModel:(WFCUMessageModel *)model;
  20. @optional
  21. - (void)didTapReceiptView:(WFCUMessageCellBase *)cell withModel:(WFCUMessageModel *)model;
  22. - (void)didDoubleTapMessageCell:(WFCUMessageCellBase *)cell withModel:(WFCUMessageModel *)model;
  23. - (void)didTapQuoteLabel:(WFCUMessageCellBase *)cell withModel:(WFCUMessageModel *)model;
  24. - (void)didTapArticleCell:(WFCUMessageCellBase *)cell withModel:(WFCUMessageModel *)model withArticle:(WFCCArticle *)article;
  25. @end
  26. @interface WFCUMessageCellBase : UICollectionViewCell
  27. @property (nonatomic, strong)UILabel *timeLabel;
  28. @property (nonatomic, strong)UIView *lastReadContainerView;
  29. @property (nonatomic, strong)WFCUMessageModel *model;
  30. @property (nonatomic, weak)id<WFCUMessageCellDelegate> delegate;
  31. + (CGSize)sizeForCell:(WFCUMessageModel *)msgModel withViewWidth:(CGFloat)width;
  32. + (CGFloat)hightForHeaderArea:(WFCUMessageModel *)msgModel;
  33. - (void)onTaped:(id)sender;
  34. - (void)onLongPressed:(id)sender;
  35. @end