123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- //
- // ReviewsTableHearV.m
- // Asteria
- //
- // Created by 王猛 on 2024/1/6.
- //
- #import "ReviewsTableHearV.h"
- @interface ReviewsTableHearV ()
- @property (nonatomic, strong) QMUILabel *reviewsLab;
- @property (nonatomic, strong) UIView *rateStarV;
- @property (nonatomic, strong) QMUIButton *writeBtn;
- @property (nonatomic, strong) QMUILabel *tipsLab;
- @end
- @implementation ReviewsTableHearV
- - (void)tt_setupViews{
- UIView *topBgV = [[UIView alloc]init];
- topBgV.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
- [self addSubview:topBgV];
- [topBgV mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(10);
- make.right.mas_equalTo(-10);
- make.top.mas_equalTo(10);
- make.height.mas_equalTo(86);
- }];
- [topBgV addSubview:self.reviewsLab];
- [topBgV addSubview:self.rateStarV];
-
-
-
- }
- #pragma mark - **************** handle ****************
- -(void)handle_writeEvent:(UIButton *)btn{
- [self generaltriggermethodType:0 data:@""];
- }
- - (QMUILabel *)reviewsLab {
- if (!_reviewsLab) {
- _reviewsLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
- _reviewsLab.textAlignment = NSTextAlignmentLeft;
- _reviewsLab.textColor = [UIColor colorWithHexString:@"#000000"];
- _reviewsLab.font = [UIFont fontWithName:Rob_Bold size:12];
- _reviewsLab.text = @"CUSTOMER REVIEWS";
- }
- return _reviewsLab;
- }
- - (UIView *)rateStarV {
- if (!_rateStarV) {
- _rateStarV = [[UIView alloc] init];
- }
- return _rateStarV;
- }
- - (QMUIButton *)writeBtn {
- if (!_writeBtn) {
- _writeBtn = [QMUIButton buttonWithType:UIButtonTypeCustom];
- NSMutableAttributedString *atr = [[NSMutableAttributedString alloc]initWithString:@"WRITE A REVIEW"];
- atr.underlineStyle = NSUnderlineStyleSingle;
- [_writeBtn setAttributedTitle:atr forState:UIControlStateNormal];
- [_writeBtn addTarget:self action:@selector(handle_writeEvent:) forControlEvents:UIControlEventTouchUpInside];
- _writeBtn.titleLabel.font = [UIFont fontWithName:Rob_Bold size:12];
- }
- return _writeBtn;
- }
- - (QMUILabel *)tipsLab {
- if (!_tipsLab) {
- _tipsLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
- _tipsLab.textAlignment = NSTextAlignmentLeft;
- _tipsLab.textColor = [UIColor blackColor];
- _tipsLab.font = [UIFont systemFontOfSize:18];
- _tipsLab.text = @"Only Registered Users Can Write Reviews.please,log In Or Register";
- }
- return _tipsLab;
- }
- @end
|