NoticeUnreadCell.m 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. self.cell1ImageView.layer.masksToBounds = YES;
  13. self.cell1ImageView.layer.cornerRadius = 4.f;
  14. }
  15. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  16. [super setSelected:selected animated:animated];
  17. // Configure the view for the selected state
  18. }
  19. + (CGFloat)configCell0Height{
  20. return 50;
  21. }
  22. + (CGFloat)configCell1Height{
  23. return 60;
  24. }
  25. + (NoticeUnreadCell *)configCell0:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  26. static NSString *cellIdentifer = @"NoticeUnreadCell0";
  27. NoticeUnreadCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  28. if (cell == nil) {
  29. cell = [[[NSBundle mainBundle] loadNibNamed:@"NoticeUnreadCell" owner:nil options:nil] objectAtIndex:0];
  30. }
  31. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  32. cell.cell0SearchBgView.layer.masksToBounds = YES;
  33. cell.cell0SearchBgView.layer.cornerRadius = 36/2.0;
  34. cell.cell0SearchBgView.backgroundColor = RGB(245, 246, 248);
  35. return cell;
  36. }
  37. + (NoticeUnreadCell *)configCell1:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  38. static NSString *cellIdentifer = @"NoticeUnreadCell1";
  39. NoticeUnreadCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  40. if (cell == nil) {
  41. cell = [[[NSBundle mainBundle] loadNibNamed:@"NoticeUnreadCell" owner:nil options:nil] objectAtIndex:1];
  42. }
  43. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  44. return cell;
  45. }
  46. @end