JCHATMessageTableViewCell.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. //
  2. // JCHATMessageTableViewCell.h
  3. // JChat
  4. //
  5. // Created by HuminiOS on 15/7/13.
  6. // Copyright (c) 2015年 HXHG. All rights reserved.
  7. //重构聊天界面代码用
  8. #import <UIKit/UIKit.h>
  9. #import "JCHATMessageContentView.h"
  10. #import "JCHATAudioPlayerHelper.h"
  11. #import "JCHATChatModel.h"
  12. #import "JCHATMessageTextView.h"
  13. #import "ShareGoodView.h"
  14. #import "CommodityDetailModel.h"
  15. @protocol playVoiceDelegate <NSObject>
  16. @optional
  17. - (void)successionalPlayVoice:(UITableViewCell *)cell indexPath:(NSIndexPath *)indexPath;
  18. - (void)getContinuePlay:(UITableViewCell *)cell indexPath:(NSIndexPath *)indexPath;
  19. - (void)selectHeadView:(JCHATChatModel *)model;
  20. - (void)setMessageIDWithMessage:(JMSGMessage *)message
  21. chatModel:(JCHATChatModel * __strong *)chatModel
  22. index:(NSInteger)index;
  23. @end
  24. @protocol PictureDelegate <NSObject>
  25. @optional
  26. - (void)tapPicture :(NSIndexPath *)index
  27. tapView :(UIImageView *)tapView
  28. tableViewCell:(UITableViewCell *)tableViewCell;
  29. - (void)selectHeadView:(JCHATChatModel *)model;
  30. @end
  31. typedef void (^JCHATMessageTableViewCellRefreshMediaMessage)(JCHATChatModel *model,BOOL isShouldRefresh);
  32. @interface JCHATMessageTableViewCell : UITableViewCell <XHAudioPlayerHelperDelegate,
  33. playVoiceDelegate,JMSGMessageDelegate>
  34. //rk20201030
  35. @property(nonatomic,strong)JCHATMessageTextView *passRKTextView;
  36. @property(strong,nonatomic)UIImageView *headView; //头像
  37. @property(strong,nonatomic)JCHATMessageContentView *messageContent; //消息
  38. @property(strong,nonatomic)JCHATChatModel *model;
  39. @property(weak, nonatomic)JMSGConversation *conversation;
  40. @property(weak, nonatomic) id delegate;
  41. @property (strong, nonatomic) UIImageView *sendFailView;
  42. @property (strong, nonatomic) UIActivityIndicatorView *circleView;
  43. //image
  44. @property (strong, nonatomic) UILabel *percentLabel;
  45. //商品
  46. @property (strong, nonatomic)ShareGoodView *goodsView;
  47. @property (strong, nonatomic)CommodityDetailModel *commodityModel;
  48. //voice
  49. @property(assign, nonatomic)BOOL continuePlayer;
  50. @property(assign, nonatomic)BOOL isPlaying;
  51. @property(assign, nonatomic)NSInteger index; //voice 语音图片的当前显示
  52. @property(strong, nonatomic)NSIndexPath *indexPath;
  53. @property(strong, nonatomic)UIView *readView;
  54. @property(strong, nonatomic)UILabel *voiceTimeLabel; //语音消息
  55. @property(strong, nonatomic) JCHATMessageTableViewCellRefreshMediaMessage messageTableViewCellRefreshMediaMessage;
  56. - (void)playVoice;
  57. - (void)setCellData:(JCHATChatModel *)model
  58. delegate:(id <playVoiceDelegate>)delegate
  59. indexPath:(NSIndexPath *)indexPath
  60. ;
  61. - (void)layoutAllView;
  62. - (void)reloadAvatarImage;
  63. @end