123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- //
- // MyCarlTableV.m
- // Asteria
- //
- // Created by 王猛 on 2024/1/27.
- //
- #import "MyCarlTableV.h"
- @implementation MyCarlTableV
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
- NSObject *objectM = self.infodata[indexPath.row];
- if([objectM isKindOfClass:[CartTotalsItemsM class]]){
- MyCartItemCell *cell = [MyCartItemCell cellWithTableView:tableView CellClass:[MyCartItemCell class]];
- [cell configData:(CartTotalsItemsM *)objectM];
- @weakify(self)
- cell.currencyparameterClose = ^(NSInteger type, id Data) {
- @strongify(self)
- [self generaltriggermethodType:type data:Data];
- };
- return cell;
- }else if([objectM isKindOfClass:[MyCartCouponCellData class]]){
- MyCartCouponCell *cell = [MyCartCouponCell cellWithTableView:tableView CellClass:[MyCartCouponCell class]];
- [cell configData:(MyCartCouponCellData *)objectM];
- @weakify(self)
- cell.currencyparameterClose = ^(NSInteger type, id Data) {
- @strongify(self)
- [self generaltriggermethodType:type data:Data];
- };
- return cell;
- }else if([objectM isKindOfClass:[MyCartGrandTotalCellData class]]){
- MyCartGrandTotalCell *cell = [MyCartGrandTotalCell cellWithTableView:tableView CellClass:[MyCartGrandTotalCell class]];
- [cell configData:(MyCartGrandTotalCellData *)objectM];
- @weakify(self)
- cell.currencyparameterClose = ^(NSInteger type, id Data) {
- @strongify(self)
- [self generaltriggermethodType:type data:Data];
- };
-
-
- return cell;
- }else if([objectM isKindOfClass:[MyCartPayTypeCellData class]]){
- MyCartPayTypeCell *cell = [MyCartPayTypeCell cellWithTableView:tableView CellClass:[MyCartPayTypeCell class]];
- [cell configData:(MyCartPayTypeCellData *)objectM];
- return cell;
- }
- return nil;
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
- return UITableViewAutomaticDimension;
- }
- - (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath{
- return 200;
- }
- @end
|