新用户优惠充值UI修改,主播卡片UI修改

This commit is contained in:
chenguilong
2022-08-05 17:45:17 +08:00
parent d6ce0d83a6
commit 3ec2e0a803
8 changed files with 79 additions and 15 deletions

View File

@@ -42,6 +42,8 @@
@property (nonatomic,strong) UIStackView * segmentView;
///
@property (nonatomic,strong) UIButton *extraButton;
///
@property (nonatomic, strong) UIImageView *unlockImageView;
///
@property (nonatomic,strong) UICollectionView *collectionView;
///
@@ -97,6 +99,7 @@
[self.rewardBackView addSubview:self.segmentView];
[self.rewardBackView addSubview:self.extraButton];
[self.rewardBackView addSubview:self.unlockImageView];
[self.rewardBackView addSubview:self.collectionView];
}
@@ -123,7 +126,8 @@
}];
[self.countDownLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.backImageView).mas_offset(87);
make.left.mas_equalTo(self.backImageView).mas_offset(47);
make.left.mas_equalTo(self.backImageView).mas_offset(20);
make.width.mas_equalTo(140);
make.height.mas_equalTo(14);
}];
[self.rechargeButton mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -146,13 +150,19 @@
}];
[self.extraButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(266, 17));
make.top.mas_equalTo(self.segmentView.mas_bottom).offset(12);
make.size.mas_equalTo(CGSizeMake(266, 22));
make.top.mas_equalTo(self.segmentView.mas_bottom).offset(8);
make.centerX.mas_equalTo(self.rewardBackView);
}];
[self.unlockImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(84, 11));
make.top.mas_equalTo(self.extraButton.mas_bottom).offset(13);
make.centerX.mas_equalTo(self.rewardBackView);
}];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.extraButton.mas_bottom).offset(12);
make.top.mas_equalTo(self.unlockImageView.mas_bottom).offset(12);
make.left.mas_equalTo(self.rewardBackView);
make.centerX.mas_equalTo(self.rewardBackView);
make.height.mas_equalTo(94);
@@ -203,7 +213,7 @@
self.rewardArray = modelInfo.firstChargeRewardList;
if (self.rewardArray.count < 4) {
[self.collectionView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.extraButton.mas_bottom).offset(12);
make.top.mas_equalTo(self.unlockImageView.mas_bottom).offset(12);
make.width.mas_equalTo(60*self.rewardArray.count + (self.rewardArray.count - 1) * 8);
make.centerX.mas_equalTo(self.rewardBackView);
make.height.mas_equalTo(94);
@@ -268,14 +278,14 @@
self.rewardArray = model.firstChargeRewardList;
if (self.rewardArray.count < 4) {
[self.collectionView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.extraButton.mas_bottom).offset(12);
make.top.mas_equalTo(self.unlockImageView.mas_bottom).offset(12);
make.width.mas_equalTo(60*self.rewardArray.count + (self.rewardArray.count - 1) * 8);
make.centerX.mas_equalTo(self.rewardBackView);
make.height.mas_equalTo(94);
}];
} else {
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.extraButton.mas_bottom).offset(12);
make.top.mas_equalTo(self.unlockImageView.mas_bottom).offset(12);
make.left.mas_equalTo(self.rewardBackView);
make.centerX.mas_equalTo(self.rewardBackView);
make.height.mas_equalTo(94);
@@ -355,6 +365,7 @@
_countDownLabel = [[UILabel alloc] init];
_countDownLabel.textColor = [UIColor whiteColor];
_countDownLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium];
_countDownLabel.textAlignment = NSTextAlignmentCenter;
}
return _countDownLabel;
}
@@ -371,11 +382,19 @@
if (!_extraButton) {
_extraButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_extraButton setTitleColor:UIColorFromRGB(0xFF3987) forState:UIControlStateNormal];
_extraButton.titleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightBold];
_extraButton.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
}
return _extraButton;
}
- (UIImageView *)unlockImageView {
if (!_unlockImageView) {
_unlockImageView = [[UIImageView alloc] init];
_unlockImageView.image = [UIImage imageNamed:@"NewUserRecharge_unlock"];
}
return _unlockImageView;
}
- (UIButton *)rechargeButton {
if (!_rechargeButton) {
_rechargeButton = [UIButton buttonWithType:UIButtonTypeCustom];