GoodsDetailsIntroduceV.m 993 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // GoodsDetailsIntroduceV.m
  3. // Asteria
  4. //
  5. // Created by 王猛 on 2023/12/27.
  6. //
  7. #import "GoodsDetailsIntroduceV.h"
  8. #import "ASHomeTipCollectCell.h"
  9. @implementation GoodsDetailsIntroduceV
  10. - (void)tt_setupViews{
  11. NSArray *titleArr = [NSArray arrayWithObjects:@"USA UK CAN\nFREE SHIPPING",@"INTERNATIONAL\nEXPRESS SHIPPING",@"SECURE PAYMENTS\nCREDIT PAY IN 4",@"30 DAYS FREE\nRETURN/EXCHANGE", nil];
  12. NSArray *imgArr = @[@"trade_tip",@"air_tip",@"pay_tip",@"box_tip"];
  13. CGFloat margin = 10;
  14. CGFloat w = (KScreenWidth- 3*margin-1)/2;
  15. CGFloat h = w/172*55;
  16. for (int i=0; i<titleArr.count; i++) {
  17. ASHomeTipCollectCell *cellV = [[ASHomeTipCollectCell alloc]init];
  18. cellV.frame = CGRectFlatMake(i%2*(w+10), i/2*h, w, h);
  19. NSString *titleStr = titleArr[i];
  20. NSString *imgName = imgArr[i];
  21. cellV.imgV.image = [UIImage imageNamed:imgName];
  22. cellV.titleLb.text = titleStr;
  23. [self addSubview:cellV];
  24. }
  25. }
  26. @end