ChatMsgNoticeCell.m 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. //
  2. // ChatMsgNoticeCell.m
  3. // smartRhino
  4. //
  5. // Created by armin on 2019/11/4.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #import "ChatMsgNoticeCell.h"
  9. @implementation ChatMsgNoticeCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. self.cell2UserImgView.layer.cornerRadius = 4.f;
  13. self.cell2UserImgView.layer.masksToBounds = YES;
  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 49.5;
  21. }
  22. + (CGFloat)configCell1Height{
  23. return 63.5;
  24. }
  25. + (CGFloat)configCell2Height{
  26. return 64;
  27. }
  28. + (ChatMsgNoticeCell *)configCell0:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  29. static NSString *cellIdentifer = @"ChatMsgNoticeCell0";
  30. ChatMsgNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  31. if (cell == nil) {
  32. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgNoticeCell" owner:nil options:nil] objectAtIndex:0];
  33. }
  34. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  35. cell.cell0SearchBgView.layer.masksToBounds = YES;
  36. cell.cell0SearchBgView.layer.cornerRadius = 29.5/2.0;
  37. cell.cell0SearchBgView.backgroundColor = RGB(245, 246, 248);
  38. return cell;
  39. }
  40. + (ChatMsgNoticeCell *)configCell1:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  41. static NSString *cellIdentifer = @"ChatMsgNoticeCell1";
  42. ChatMsgNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  43. if (cell == nil) {
  44. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgNoticeCell" owner:nil options:nil] objectAtIndex:1];
  45. }
  46. cell.IsTopImgV.hidden = YES;
  47. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  48. return cell;
  49. }
  50. + (ChatMsgNoticeCell *)configCell2:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  51. static NSString *cellIdentifer = @"ChatMsgNoticeCell2";
  52. ChatMsgNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  53. if (cell == nil) {
  54. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgNoticeCell" owner:nil options:nil] objectAtIndex:2];
  55. }
  56. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  57. cell.cell2RedBgView.layer.masksToBounds = YES;
  58. cell.cell2RedBgView.layer.cornerRadius = 5.f;
  59. cell.cell2RedBgView.hidden = YES;
  60. cell.IsTopImgV.hidden = YES;
  61. cell.cell2EditBtn.hidden = YES;
  62. cell.cell2TimeLabel.hidden = NO;
  63. [cell.cell2EditBtn setTitle:@"编辑" forState:UIControlStateNormal];
  64. return cell;
  65. }
  66. + (ChatMsgNoticeCell *)configCell10:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  67. static NSString *cellIdentifer = @"ChatMsgNoticeCell10";
  68. ChatMsgNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  69. if (cell == nil) {
  70. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgNoticeCell" owner:nil options:nil] objectAtIndex:3];
  71. }
  72. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  73. return cell;
  74. }
  75. + (ChatMsgNoticeCell *)configCell20:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  76. static NSString *cellIdentifer = @"ChatMsgNoticeCell20";
  77. ChatMsgNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  78. if (cell == nil) {
  79. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgNoticeCell" owner:nil options:nil] objectAtIndex:4];
  80. }
  81. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  82. cell.cell2RedBgView.layer.masksToBounds = YES;
  83. cell.cell2RedBgView.layer.cornerRadius = 5.f;
  84. cell.cell2RedBgView.hidden = YES;
  85. cell.cell2EditBtn.hidden = YES;
  86. cell.cell2TimeLabel.hidden = NO;
  87. [cell.cell2EditBtn setTitle:@"编辑" forState:UIControlStateNormal];
  88. return cell;
  89. }
  90. + (ChatMsgNoticeCell *)configCell30:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  91. static NSString *cellIdentifer = @"ChatMsgNoticeCell30";
  92. ChatMsgNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  93. if (cell == nil) {
  94. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgNoticeCell" owner:nil options:nil] objectAtIndex:5];
  95. }
  96. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  97. return cell;
  98. }
  99. + (ChatMsgNoticeCell *)configCell40:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  100. static NSString *cellIdentifer = @"ChatMsgNoticeCell40";
  101. ChatMsgNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  102. if (cell == nil) {
  103. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgNoticeCell" owner:nil options:nil] objectAtIndex:6];
  104. }
  105. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  106. return cell;
  107. }
  108. + (ChatMsgNoticeCell *)configCell50:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  109. static NSString *cellIdentifer = @"ChatMsgNoticeCell50";
  110. ChatMsgNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  111. if (cell == nil) {
  112. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgNoticeCell" owner:nil options:nil] objectAtIndex:7];
  113. }
  114. cell.yanRedNumL.layer.cornerRadius = 8.f;
  115. cell.yanRedNumL.layer.masksToBounds = YES;
  116. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  117. return cell;
  118. }
  119. @end