NoticeUnreadCell.m 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // NoticeUnreadCell.m
  3. // smartRhino
  4. //
  5. // Created by armin on 2019/11/6.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #import "NoticeUnreadCell.h"
  9. @implementation NoticeUnreadCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. // Initialization code
  13. }
  14. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  15. [super setSelected:selected animated:animated];
  16. // Configure the view for the selected state
  17. }
  18. + (CGFloat)configCell0Height{
  19. return 50;
  20. }
  21. + (CGFloat)configCell1Height{
  22. return 60;
  23. }
  24. + (NoticeUnreadCell *)configCell0:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  25. static NSString *cellIdentifer = @"NoticeUnreadCell0";
  26. NoticeUnreadCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  27. if (cell == nil) {
  28. cell = [[[NSBundle mainBundle] loadNibNamed:@"NoticeUnreadCell" owner:nil options:nil] objectAtIndex:0];
  29. }
  30. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  31. cell.cell0SearchBgView.layer.masksToBounds = YES;
  32. cell.cell0SearchBgView.layer.cornerRadius = 36/2.0;
  33. cell.cell0SearchBgView.backgroundColor = RGB(245, 246, 248);
  34. return cell;
  35. }
  36. + (NoticeUnreadCell *)configCell1:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  37. static NSString *cellIdentifer = @"NoticeUnreadCell1";
  38. NoticeUnreadCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  39. if (cell == nil) {
  40. cell = [[[NSBundle mainBundle] loadNibNamed:@"NoticeUnreadCell" owner:nil options:nil] objectAtIndex:1];
  41. }
  42. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  43. return cell;
  44. }
  45. @end