My_CenterCell.m 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 160 + kStatusBarHeight;
  20. }
  21. + (CGFloat)configCell1Height{
  22. return 48;
  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 = kStatusBarHeight + 44;
  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. return cell;
  49. }
  50. @end