ReviewsTableHearV.m 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. //
  2. // ReviewsTableHearV.m
  3. // Asteria
  4. //
  5. // Created by 王猛 on 2024/1/6.
  6. //
  7. #import "ReviewsTableHearV.h"
  8. @interface ReviewsTableHearV ()
  9. @property (nonatomic, strong) QMUILabel *reviewsLab;
  10. @property (nonatomic, strong) UIView *rateStarV;
  11. @property (nonatomic, strong) QMUIButton *writeBtn;
  12. @property (nonatomic, strong) QMUILabel *tipsLab;
  13. @end
  14. @implementation ReviewsTableHearV
  15. - (void)tt_setupViews{
  16. UIView *topBgV = [[UIView alloc]init];
  17. topBgV.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
  18. [self addSubview:topBgV];
  19. [topBgV mas_makeConstraints:^(MASConstraintMaker *make) {
  20. make.left.mas_equalTo(10);
  21. make.right.mas_equalTo(-10);
  22. make.top.mas_equalTo(10);
  23. make.height.mas_equalTo(86);
  24. }];
  25. [topBgV addSubview:self.reviewsLab];
  26. [topBgV addSubview:self.rateStarV];
  27. }
  28. #pragma mark - **************** handle ****************
  29. -(void)handle_writeEvent:(UIButton *)btn{
  30. [self generaltriggermethodType:0 data:@""];
  31. }
  32. - (QMUILabel *)reviewsLab {
  33. if (!_reviewsLab) {
  34. _reviewsLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
  35. _reviewsLab.textAlignment = NSTextAlignmentLeft;
  36. _reviewsLab.textColor = [UIColor colorWithHexString:@"#000000"];
  37. _reviewsLab.font = [UIFont fontWithName:Rob_Bold size:12];
  38. _reviewsLab.text = @"CUSTOMER REVIEWS";
  39. }
  40. return _reviewsLab;
  41. }
  42. - (UIView *)rateStarV {
  43. if (!_rateStarV) {
  44. _rateStarV = [[UIView alloc] init];
  45. }
  46. return _rateStarV;
  47. }
  48. - (QMUIButton *)writeBtn {
  49. if (!_writeBtn) {
  50. _writeBtn = [QMUIButton buttonWithType:UIButtonTypeCustom];
  51. NSMutableAttributedString *atr = [[NSMutableAttributedString alloc]initWithString:@"WRITE A REVIEW"];
  52. atr.underlineStyle = NSUnderlineStyleSingle;
  53. [_writeBtn setAttributedTitle:atr forState:UIControlStateNormal];
  54. [_writeBtn addTarget:self action:@selector(handle_writeEvent:) forControlEvents:UIControlEventTouchUpInside];
  55. _writeBtn.titleLabel.font = [UIFont fontWithName:Rob_Bold size:12];
  56. }
  57. return _writeBtn;
  58. }
  59. - (QMUILabel *)tipsLab {
  60. if (!_tipsLab) {
  61. _tipsLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
  62. _tipsLab.textAlignment = NSTextAlignmentLeft;
  63. _tipsLab.textColor = [UIColor blackColor];
  64. _tipsLab.font = [UIFont systemFontOfSize:18];
  65. _tipsLab.text = @"Only Registered Users Can Write Reviews.please,log In Or Register";
  66. }
  67. return _tipsLab;
  68. }
  69. @end