CommunityCell.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /**
  2. 驾考社区的cell;
  3. */
  4. //其实可以style隐藏起来。通过设置不同的model。来区分style
  5. #import <UIKit/UIKit.h>
  6. @protocol CommunityCellDelegate;
  7. @interface CommunityCell : UITableViewCell
  8. /**2017/12/20 lee 新增 用以通知vc隐藏键盘
  9. */
  10. @property(nonatomic,copy)BlockTypeVo block;
  11. @property(assign) id <CommunityCellDelegate> delegate;
  12. /**不要解析。直接传json的字典过来。
  13. */
  14. @property(nonatomic,strong)NSDictionary* model;
  15. @property(nonatomic,strong) UILabel *acceptLabel;
  16. /**需要显示tag标签的画。将它设置为YES。default是NO。
  17. */
  18. @property(assign)BOOL showTag;
  19. /**这里可以有style的。
  20. 0 是驾考社区,1是话题详情的。2学车日记的。
  21. */
  22. +(CommunityCell*)cellForTableView:(UITableView*)tableView Style:(NSInteger)style;
  23. @end
  24. @protocol CommunityCellDelegate <NSObject>
  25. @optional
  26. /**对某一话题进行评论
  27. */
  28. -(void)gotoComment:(NSString*)comId;
  29. /**
  30. 把点赞。写一个代理方法。
  31. 取消赞,写一个代理方法。
  32. */
  33. -(void)didDePoint:(NSDictionary*)dict;
  34. -(void)didPoint:(NSDictionary*)dict;
  35. @end
  36. /**根据字典返回cell的高度.
  37. 总共3种style。话题列表的。话题详情。学车日记的。
  38. */
  39. CGFloat communityCellHeight(NSDictionary* dict , NSInteger type);
  40. /**
  41. 要修改一下风格。只有type为1时,才显示lblTab。其他不显示。
  42. 并且还要修改lblAddr的位置。
  43. */