ASGoodsReviewFootCell.m 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // ASGoodsReviewFootCell.m
  3. // Asteria
  4. //
  5. // Created by xingyu on 2024/5/25.
  6. //
  7. #import "ASGoodsReviewFootCell.h"
  8. @interface ASGoodsReviewFootCell()
  9. @property (nonatomic, strong) UIButton *viewMoreBtn;
  10. @end
  11. @implementation ASGoodsReviewFootCell
  12. - (void)setupSubviewS {
  13. [self.contentView addSubview:self.viewMoreBtn];
  14. [self.viewMoreBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  15. make.top.mas_equalTo(10);
  16. make.height.mas_equalTo(36);
  17. make.width.mas_equalTo(200);
  18. make.centerX.mas_equalTo(self.contentView);
  19. make.bottom.mas_equalTo(-20);
  20. }];
  21. }
  22. - (void)_btnClick {
  23. if (self.currencyparameterClose) {
  24. self.currencyparameterClose(5, nil);
  25. }
  26. }
  27. - (UIButton *)viewMoreBtn {
  28. if (!_viewMoreBtn) {
  29. _viewMoreBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  30. _viewMoreBtn.titleLabel.font = [UIFont fontWithName:Rob_Regular size:16];
  31. [_viewMoreBtn setTitle:@"VIEW MORE" forState:UIControlStateNormal];
  32. [_viewMoreBtn setTitleColor:Col_000 forState:UIControlStateNormal];
  33. _viewMoreBtn.backgroundColor = Col_FFF;
  34. [_viewMoreBtn addTarget:self action:@selector(_btnClick) forControlEvents:UIControlEventTouchUpInside];
  35. TT_ViewBorderRadius(_viewMoreBtn, 4, 1, Col_000);
  36. }
  37. return _viewMoreBtn;
  38. }
  39. @end