ChatNewRowCell.m 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. //
  2. // ChatNewRowCell.m
  3. // smartRhino
  4. //
  5. // Created by niuzhen on 2019/12/10.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #import "ChatNewRowCell.h"
  9. @implementation ChatNewRowCell
  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 65;
  23. }
  24. + (CGFloat)configCell2Height{
  25. return 65;
  26. }
  27. + (ChatNewRowCell *)configCell0:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  28. static NSString *cellIdentifer = @"ChatNewRowCell0";
  29. ChatNewRowCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  30. if (cell == nil) {
  31. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatNewRowCell" owner:nil options:nil] objectAtIndex:0];
  32. }
  33. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  34. cell.cell0SearchBgView.layer.masksToBounds = YES;
  35. cell.cell0SearchBgView.layer.cornerRadius = 15;
  36. cell.cell0SearchBgView.backgroundColor = RGB(245, 246, 248);
  37. return cell;
  38. }
  39. + (ChatNewRowCell *)configCell1:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  40. static NSString *cellIdentifer = @"ChatNewRowCell1";
  41. ChatNewRowCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  42. if (cell == nil) {
  43. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatNewRowCell" owner:nil options:nil] objectAtIndex:1];
  44. }
  45. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  46. return cell;
  47. }
  48. + (ChatNewRowCell *)configCell2:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  49. static NSString *cellIdentifer = @"ChatNewRowCell2";
  50. ChatNewRowCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  51. if (cell == nil) {
  52. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatNewRowCell" owner:nil options:nil] objectAtIndex:2];
  53. }
  54. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  55. cell.cell2TimeLabel.hidden = NO;
  56. return cell;
  57. }
  58. + (ChatNewRowCell *)configCell10:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  59. static NSString *cellIdentifer = @"ChatNewRowCell10";
  60. ChatNewRowCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  61. if (cell == nil) {
  62. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatNewRowCell" owner:nil options:nil] objectAtIndex:3];
  63. }
  64. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  65. return cell;
  66. }
  67. + (ChatNewRowCell *)configCell20:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  68. static NSString *cellIdentifer = @"ChatNewRowCell20";
  69. ChatNewRowCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  70. if (cell == nil) {
  71. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatNewRowCell" owner:nil options:nil] objectAtIndex:4];
  72. }
  73. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  74. cell.cell2TimeLabel.hidden = NO;
  75. return cell;
  76. }
  77. + (ChatNewRowCell *)configCell30:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  78. static NSString *cellIdentifer = @"ChatNewRowCell30";
  79. ChatNewRowCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  80. if (cell == nil) {
  81. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatNewRowCell" owner:nil options:nil] objectAtIndex:5];
  82. }
  83. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  84. return cell;
  85. }
  86. + (ChatNewRowCell *)configCell40:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  87. static NSString *cellIdentifer = @"ChatNewRowCell40";
  88. ChatNewRowCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  89. if (cell == nil) {
  90. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatNewRowCell" owner:nil options:nil] objectAtIndex:6];
  91. }
  92. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  93. return cell;
  94. }
  95. @end