WFCUMessageCellBase.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  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. @end
  20. @interface WFCUMessageCellBase : UICollectionViewCell
  21. @property (nonatomic, strong)UILabel *timeLabel;
  22. @property (nonatomic, strong)WFCUMessageModel *model;
  23. @property (nonatomic, weak)id<WFCUMessageCellDelegate> delegate;
  24. + (CGSize)sizeForCell:(WFCUMessageModel *)msgModel withViewWidth:(CGFloat)width;
  25. + (CGFloat)hightForTimeLabel:(WFCUMessageModel *)msgModel;
  26. - (void)onTaped:(id)sender;
  27. - (void)onLongPressed:(id)sender;
  28. @end