CommentCell.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /**
  2. 做cell也有一个流程。
  3. 先写一个简单的view,填假数据,显示。
  4. 创建model,只写一个属性。加载model,并传给cell。显示这个真数据。
  5. 接下来,就简单了。
  6. */
  7. #import <UIKit/UIKit.h>
  8. typedef enum{
  9. /**试题分析,没有星星
  10. */
  11. CommentCellStyleQuestion,
  12. /**驾校/教练点评,有星星
  13. */
  14. CommentCellStyleSchool
  15. }CommentCellStyle;
  16. @protocol CommentCellDelegate;
  17. @interface CommentCell : UITableViewCell
  18. {
  19. UIImageView* honorIv;
  20. UILabel* celDateLbl;
  21. CommentCellStyle cellStyle;
  22. }
  23. @property (nonatomic, copy) NSString *VCName;
  24. /**暂时只有对驾校的评论。教练的是空的。
  25. */
  26. @property(nonatomic,strong)NSDictionary* dict;
  27. /**cell的model
  28. */
  29. //@property(nonatomic,strong)Comment* model;
  30. /**
  31. 试题评论页面用
  32. */
  33. @property (nonatomic, strong) NSDictionary *commentDic;
  34. /**点赞按钮
  35. */
  36. @property(nonatomic,strong)UIButton* upBtn;
  37. @property(assign)id <CommentCellDelegate>delegate2;
  38. +(CommentCell*)cellForTableView:(UITableView*)tableView Style:(CommentCellStyle )style;
  39. @end
  40. @protocol CommentCellDelegate <NSObject>
  41. -(void)approveComId:(NSString*)comId;
  42. @end