ChatMsgDetailChatInfoCell.m 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. //
  2. // ChatMsgDetailChatInfoCell.m
  3. // smartRhino
  4. //
  5. // Created by armin on 2019/11/7.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #import "ChatMsgDetailChatInfoCell.h"
  9. @implementation ChatMsgDetailChatInfoCell
  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 100;
  20. }
  21. + (CGFloat)configCell1Height{
  22. return 50;
  23. }
  24. + (CGFloat)configCell2Height{
  25. return 65;
  26. }
  27. + (CGFloat)configCell3Height{
  28. return 272;
  29. }
  30. + (CGFloat)configCell4Height{
  31. return 65;
  32. }
  33. + (CGFloat)configCell5Height{
  34. return 65;
  35. }
  36. + (ChatMsgDetailChatInfoCell *)configCell0:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  37. static NSString *cellIdentifer = @"ChatMsgDetailChatInfoCell0";
  38. ChatMsgDetailChatInfoCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  39. if (cell == nil) {
  40. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgDetailChatInfoCell" owner:nil options:nil] objectAtIndex:0];
  41. }
  42. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  43. return cell;
  44. }
  45. + (ChatMsgDetailChatInfoCell *)configCell1:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  46. static NSString *cellIdentifer = @"ChatMsgDetailChatInfoCell1";
  47. ChatMsgDetailChatInfoCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  48. if (cell == nil) {
  49. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgDetailChatInfoCell" owner:nil options:nil] objectAtIndex:1];
  50. }
  51. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  52. return cell;
  53. }
  54. + (ChatMsgDetailChatInfoCell *)configCell2:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  55. static NSString *cellIdentifer = @"ChatMsgDetailChatInfoCell2";
  56. ChatMsgDetailChatInfoCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  57. if (cell == nil) {
  58. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgDetailChatInfoCell" owner:nil options:nil] objectAtIndex:2];
  59. }
  60. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  61. cell.cell2Switch.hidden = YES;
  62. cell.cell2ValueLabel.hidden = NO;
  63. cell.cell2RightArrowImg.hidden = NO;
  64. [cell.cell2Switch setTintColor:RGB(187, 187, 187)];
  65. [cell.cell2Switch setOnTintColor:RGB(57, 121, 211)];
  66. cell.cell2Switch.transform = CGAffineTransformMakeScale(0.8, 0.8);
  67. cell.cell2LineView.hidden = NO;
  68. return cell;
  69. }
  70. + (ChatMsgDetailChatInfoCell *)configCell3:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  71. static NSString *cellIdentifer = @"ChatMsgDetailChatInfoCell3";
  72. ChatMsgDetailChatInfoCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  73. if (cell == nil) {
  74. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgDetailChatInfoCell" owner:nil options:nil] objectAtIndex:3];
  75. }
  76. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  77. cell.cell3LineView.hidden = NO;
  78. return cell;
  79. }
  80. + (ChatMsgDetailChatInfoCell *)configCell4:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  81. static NSString *cellIdentifer = @"ChatMsgDetailChatInfoCell4";
  82. ChatMsgDetailChatInfoCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  83. if (cell == nil) {
  84. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgDetailChatInfoCell" owner:nil options:nil] objectAtIndex:4];
  85. }
  86. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  87. cell.cell4LineView.hidden = NO;
  88. return cell;
  89. }
  90. + (ChatMsgDetailChatInfoCell *)configCell5:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  91. static NSString *cellIdentifer = @"ChatMsgDetailChatInfoCell5";
  92. ChatMsgDetailChatInfoCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  93. if (cell == nil) {
  94. cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgDetailChatInfoCell" owner:nil options:nil] objectAtIndex:5];
  95. }
  96. cell.ChatImgV.layer.cornerRadius = 4.f;
  97. cell.ChatImgV.layer.masksToBounds = YES;
  98. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  99. return cell;
  100. }
  101. @end