RecommendTableViewCell.m 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // RecommendTableViewCell.m
  3. // BuguLive
  4. //
  5. // Created by 王珂 on 17/3/30.
  6. // Copyright © 2017年 xfg. All rights reserved.
  7. //
  8. #import "RecommendTableViewCell.h"
  9. @implementation RecommendTableViewCell
  10. - (void)awakeFromNib
  11. {
  12. [super awakeFromNib];
  13. _recommendLabel.textColor = kAppGrayColor1;
  14. _recommendTypeField.textColor = kAppGrayColor4;
  15. _recommendField.textColor = kAppGrayColor4;
  16. self.clipsToBounds = YES;
  17. }
  18. + (instancetype)cellWithTableView:(UITableView *)tableView
  19. {
  20. static NSString *ID = @"recommendCell";
  21. RecommendTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
  22. if (cell == nil)
  23. {
  24. cell = [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil] lastObject];
  25. }
  26. return cell;
  27. }
  28. - (IBAction)choseType:(id)sender
  29. {
  30. if (_delegate && [_delegate respondsToSelector:@selector(choseRecommendTypeWithRecommendViewCell:)])
  31. {
  32. [_delegate choseRecommendTypeWithRecommendViewCell:self];
  33. }
  34. }
  35. @end