MHTopicCell.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // MHTopicCell.h
  3. // MHDevelopExample
  4. //
  5. // Created by CoderMikeHe on 17/2/9.
  6. // Copyright © 2017年 CoderMikeHe. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "TDButton.h"
  10. @class MHTopicFrame,MHTopicCell,MHUser;
  11. @protocol MHTopicCellDelegate <NSObject>
  12. @optional
  13. /** 点击头像或昵称的事件回调 */
  14. - (void)topicCellDidClickedUser:(MHTopicCell *)topicCell;
  15. /** 点击头像或昵称的事件回调 */
  16. //- (void)topicCellDidClickedTopicContent:(MHTopicCell *)topicCell;
  17. /** 用户点击更多按钮 */
  18. - (void)topicCellForClickedMoreAction:(MHTopicCell *)topicCell;
  19. /** 点击评论cell的昵称 */
  20. - (void) topicCell:(MHTopicCell *)topicCell didClickedUser:(NSString *)userId;
  21. /** 点击某一行的cell */
  22. - (void) topicCell:(MHTopicCell *)topicCell didSelectRowAtIndexPath:(NSIndexPath *)indexPath;
  23. @end
  24. @interface MHTopicCell : UITableViewCell
  25. + (instancetype)cellWithTableView:(UITableView *)tableView;
  26. /** 话题模型数据源 */
  27. @property (nonatomic , strong) MHTopicFrame *topicFrame;
  28. /** 代理 */
  29. @property (nonatomic , weak) id <MHTopicCellDelegate> delegate;
  30. /** 点赞 */
  31. @property (nonatomic , strong) TDButton *thumbBtn;
  32. /** 文本内容 */
  33. @property (nonatomic , weak) YYLabel *contentLabel;
  34. /** 创建时间 */
  35. @property (nonatomic , strong) YYLabel *createTimeLabel;
  36. /** UITableView */
  37. @property (nonatomic , weak) UITableView *tableView;
  38. @property (nonatomic, copy) void(^replyContentBlock)(void);
  39. @property (nonatomic, copy) void(^longBlock)(void);
  40. @property (nonatomic, copy) void(^longSubBlock)(NSInteger commentId,UILabel * label);
  41. @end