123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // GoodsReviewsListTableV.m
- // Asteria
- //
- // Created by 王猛 on 2024/1/5.
- //
- #import "GoodsReviewsListTableV.h"
- #import <GKPhotoBrowser/GKPhotoBrowser.h>
- @implementation GoodsReviewsListTableV
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- GoodsReviewsListM *objectM = self.infodata[indexPath.row];
- GoodsReviewsCell *cell = [GoodsReviewsCell cellWithTableView:tableView CellClass:[GoodsReviewsCell class]];
- [cell configData:objectM];
- // @weakify(cell)
- cell.currencyparameterClose = ^(NSInteger type, id Data) {
- // @strongify(cell) //图片选择器展示
-
- NSArray *imageArr = (NSArray *)Data;
- NSMutableArray *photos = [[NSMutableArray alloc]init];
- for (NSString *imgUrl in imageArr) {
- GKPhoto *photo = [GKPhoto new];
- photo.placeholderImage = UIImageDefaultImg_SD;
- photo.url = [NSURL URLWithString:imgUrl];
- [photos addObject:photo];
- }
- GKPhotoBrowser *photoBrowser = [GKPhotoBrowser photoBrowserWithPhotos:photos currentIndex:type];
- photoBrowser.showStyle = GKPhotoBrowserShowStyleNone;
- photoBrowser.failureText = @"Net Error";
- [photoBrowser showFromVC:[Current_normalTool topViewController]];
-
- };
- return cell;
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
- return UITableViewAutomaticDimension;
- }
- - (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath{
- return 100;
- }
- - (void)configData:(id)Data{
- NSMutableArray <GoodsReviewsListM *>*tmpAry = Data;
- self.infodata = tmpAry;
- [self reloadData];
- }
- @end
|