CommonListCell.m 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // CommonListCell.m
  3. // smartRhino
  4. //
  5. // Created by niuzhen on 2020/4/28.
  6. // Copyright © 2020 tederen. All rights reserved.
  7. //
  8. #import "CommonListCell.h"
  9. @implementation CommonListCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. // Initialization code
  13. }
  14. + (CGFloat)configCell0Height{
  15. return 72;
  16. }
  17. + (CommonListCell *)configCell0:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  18. static NSString *cellIdentifer = @"CommonListCell0";
  19. CommonListCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  20. if (cell == nil) {
  21. cell = [[[NSBundle mainBundle] loadNibNamed:@"CommonListCell" owner:nil options:nil] objectAtIndex:0];
  22. }
  23. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  24. return cell;
  25. }
  26. + (CommonListCell *)configCell1:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
  27. static NSString *cellIdentifer = @"CommonListCell1";
  28. CommonListCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
  29. if (cell == nil) {
  30. cell = [[[NSBundle mainBundle] loadNibNamed:@"CommonListCell" owner:nil options:nil] objectAtIndex:1];
  31. }
  32. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  33. return cell;
  34. }
  35. - (void)setCell1Data:(CommonListModel *)model
  36. {
  37. self.titleL.text = model.Title;
  38. self.nameL.text = model.Name;
  39. self.desL.text = model.Des;
  40. }
  41. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  42. [super setSelected:selected animated:animated];
  43. // Configure the view for the selected state
  44. }
  45. @end