GoodsSizeSelectTableV.m 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // GoodsSizeSelectTableV.m
  3. // westkissMob
  4. //
  5. // Created by 王猛 on 2022/9/22.
  6. //
  7. #import "GoodsSizeSelectTableV.h"
  8. @implementation GoodsSizeSelectTableV
  9. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  10. NSObject *objectM = self.infodata[indexPath.row];
  11. if([objectM isKindOfClass:[OptionsModel class]]){
  12. GoosSizeSelectCell *cell = [GoosSizeSelectCell cellWithTableView:tableView CellClass:[GoosSizeSelectCell class]];
  13. [cell configData:(OptionsModel *)objectM];
  14. @weakify(self)
  15. cell.currencyparameterClose = ^(NSInteger type, id Data) {
  16. @strongify(self)
  17. [self generaltriggermethodType:indexPath.row data:(OptionsModel *)Data];
  18. };
  19. return cell;
  20. }else if([objectM isKindOfClass:[GoodsSizeCountCellData class]]){
  21. GoodsSizeCountCell *cell = [GoodsSizeCountCell cellWithTableView:tableView CellClass:[GoodsSizeCountCell class]];
  22. [cell configData:(GoodsSizeCountCellData *)objectM];
  23. cell.currencyparameterClose = ^(NSInteger type, id Data) { //0- ,1+
  24. [self generaltriggermethodType:type data:(NSString *)Data];
  25. };
  26. return cell;
  27. }else if([objectM isKindOfClass:[GoodsSizePayMentCellData class]]){
  28. GoodsSizePayMentCell *cell = [GoodsSizePayMentCell cellWithTableView:tableView CellClass:[GoodsSizePayMentCell class]];
  29. [cell configData:(GoodsSizePayMentCellData *)objectM];
  30. cell.currencyparameterClose = ^(NSInteger type, id Data) {
  31. [self generaltriggermethodType:type data:(NSString *)Data];
  32. };
  33. return cell;
  34. }
  35. return nil;
  36. }
  37. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
  38. return UITableViewAutomaticDimension;
  39. }
  40. - (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath
  41. {
  42. return 20+18+10+32+10;
  43. }
  44. @end