TestinCell.m 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // TestinCell.m
  3. // smartRhino
  4. //
  5. // Created by taidi on 2019/12/12.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #import "TestinCell.h"
  9. @implementation TestinCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. // Initialization code
  13. self.iconImageView.layer.cornerRadius = 4;
  14. self.iconImageView.layer.masksToBounds = YES;
  15. }
  16. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  17. [super setSelected:selected animated:animated];
  18. }
  19. + (TestinCell *)configCell0:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  20. static NSString *cellIdentifer = @"TestinCell0";
  21. TestinCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  22. if (cell == nil) {
  23. cell = [[[NSBundle mainBundle] loadNibNamed:@"TestinCell" owner:nil options:nil] objectAtIndex:0];
  24. }
  25. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  26. return cell;
  27. }
  28. + (TestinCell *)configCell1:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  29. static NSString *cellIdentifer = @"TestinCell1";
  30. TestinCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  31. if (cell == nil) {
  32. cell = [[[NSBundle mainBundle] loadNibNamed:@"TestinCell" owner:nil options:nil] objectAtIndex:1];
  33. }
  34. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  35. return cell;
  36. }
  37. + (TestinCell *)configCell2:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  38. static NSString *cellIdentifer = @"TestinCell2";
  39. TestinCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  40. if (cell == nil) {
  41. cell = [[[NSBundle mainBundle] loadNibNamed:@"TestinCell" owner:nil options:nil] objectAtIndex:2];
  42. }
  43. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  44. return cell;
  45. }
  46. @end