My_CenterCell.m 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //
  2. // My_CenterCell.m
  3. // smartRhino
  4. //
  5. // Created by armin on 2019/11/1.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #import "My_CenterCell.h"
  9. @implementation My_CenterCell
  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 116 + kStatusBarHeight;
  20. }
  21. + (CGFloat)configCell1Height{
  22. return 47.5;
  23. }
  24. + (My_CenterCell *)configCell0:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  25. static NSString *cellIdentifer = @"My_CenterCell0";
  26. My_CenterCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  27. if (cell == nil || !cell) {
  28. cell = [[[NSBundle mainBundle] loadNibNamed:@"My_CenterCell" owner:nil options:nil] objectAtIndex:0];
  29. }
  30. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  31. cell.cell0IntrtBgView.layer.masksToBounds = YES;
  32. cell.cell0IntrtBgView.layer.cornerRadius = 4.0;
  33. cell.cell0IntrtBgView.layer.borderWidth = 1.0;
  34. cell.cell0IntrtBgView.layer.borderColor = RGB(255.0, 255.0, 255.0).CGColor;
  35. cell.cell0UserImgView.layer.masksToBounds = YES;
  36. cell.cell0UserImgView.layer.cornerRadius = cell.cell0UserImgView.size.width/2;
  37. cell.cell0UserImgView.layer.borderWidth = 1.0;
  38. cell.cell0UserImgView.layer.borderColor = RGB(255.0, 255.0, 255.0).CGColor;
  39. cell.cell0TopH.constant = 32 + kStatusBarHeight;
  40. return cell;
  41. }
  42. + (My_CenterCell *)configCell1:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  43. static NSString *cellIdentifer = @"My_CenterCell1";
  44. My_CenterCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  45. if (cell == nil || !cell) {
  46. cell = [[[NSBundle mainBundle] loadNibNamed:@"My_CenterCell" owner:nil options:nil] objectAtIndex:1];
  47. }
  48. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  49. return cell;
  50. }
  51. @end