GoodsReviewsListTableV.m 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // GoodsReviewsListTableV.m
  3. // Asteria
  4. //
  5. // Created by 王猛 on 2024/1/5.
  6. //
  7. #import "GoodsReviewsListTableV.h"
  8. #import <GKPhotoBrowser/GKPhotoBrowser.h>
  9. @implementation GoodsReviewsListTableV
  10. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  11. GoodsReviewsListM *objectM = self.infodata[indexPath.row];
  12. GoodsReviewsCell *cell = [GoodsReviewsCell cellWithTableView:tableView CellClass:[GoodsReviewsCell class]];
  13. [cell configData:objectM];
  14. @weakify(cell)
  15. cell.currencyparameterClose = ^(NSInteger type, id Data) {
  16. @strongify(cell) //图片选择器展示
  17. NSArray *imageArr = (NSArray *)Data;
  18. NSMutableArray *photos = [[NSMutableArray alloc]init];
  19. for (NSString *imgUrl in imageArr) {
  20. GKPhoto *photo = [GKPhoto new];
  21. photo.placeholderImage = UIImageDefaultImg_SD;
  22. photo.url = [NSURL URLWithString:imgUrl];
  23. [photos addObject:photo];
  24. }
  25. GKPhotoBrowser *photoBrowser = [GKPhotoBrowser photoBrowserWithPhotos:photos currentIndex:type];
  26. photoBrowser.showStyle = GKPhotoBrowserShowStyleNone;
  27. [photoBrowser showFromVC:[Current_normalTool topViewController]];
  28. };
  29. return cell;
  30. }
  31. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  32. return UITableViewAutomaticDimension;
  33. }
  34. - (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath{
  35. return 100;
  36. }
  37. - (void)configData:(id)Data{
  38. NSMutableArray <GoodsReviewsListM *>*tmpAry = Data;
  39. self.infodata = tmpAry;
  40. [self reloadData];
  41. }
  42. @end