是否显示首充奖励入口以及首充奖励的奖励列表
This commit is contained in:
@@ -36,7 +36,8 @@
|
||||
@property (nonatomic,strong) UIButton *arrowButton;
|
||||
///赠送
|
||||
@property (nonatomic,strong) UIButton *sendGiftButton;
|
||||
|
||||
///首充
|
||||
@property (nonatomic,strong) UIButton *firstRechargeButton;
|
||||
///自定义个数
|
||||
@property (nonatomic,strong) UIView *customCountView;
|
||||
//输入框
|
||||
@@ -101,11 +102,16 @@
|
||||
self.countLabel.text = countStr;
|
||||
}
|
||||
|
||||
- (void)firstRechargeButtonAction:(UIButton *)sender{
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor= [UIColor clearColor];
|
||||
[self addSubview:self.balanceLabel];
|
||||
[self addSubview:self.rechargeStackView];
|
||||
[self addSubview:self.firstRechargeButton];
|
||||
[self addSubview:self.sendOperationView];
|
||||
|
||||
[self.rechargeStackView addArrangedSubview:self.rechargeLabel];
|
||||
@@ -135,6 +141,12 @@
|
||||
make.left.mas_equalTo(self.balanceLabel.mas_right).offset(12);
|
||||
}];
|
||||
|
||||
[self.firstRechargeButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(50, 14));
|
||||
make.left.mas_equalTo(self.rechargeStackView.mas_right).offset(4);
|
||||
make.centerY.mas_equalTo(self.rechargeStackView);
|
||||
}];
|
||||
|
||||
[self.sendOperationView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self).offset(-15);
|
||||
make.bottom.mas_equalTo(-11);
|
||||
@@ -253,6 +265,10 @@
|
||||
return NO;
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setIsShowFirstRecharge:(BOOL)isShowFirstRecharge {
|
||||
self.firstRechargeButton.hidden = !isShowFirstRecharge;
|
||||
}
|
||||
|
||||
- (void)setType:(GiftSegmentType)type {
|
||||
if (!self.giftCountView.hidden) {
|
||||
self.giftCountView.hidden = YES;
|
||||
@@ -413,4 +429,14 @@
|
||||
return _giftCountView;
|
||||
}
|
||||
|
||||
- (UIButton *)firstRechargeButton {
|
||||
if (!_firstRechargeButton) {
|
||||
_firstRechargeButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_firstRechargeButton setImage:[UIImage imageNamed:@"gift_first_recharge_bg"] forState:UIControlStateNormal];
|
||||
[_firstRechargeButton setImage:[UIImage imageNamed:@"gift_first_recharge_bg"] forState:UIControlStateSelected];
|
||||
[_firstRechargeButton addTarget:self action:@selector(firstRechargeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _firstRechargeButton;
|
||||
}
|
||||
|
||||
@end
|
||||
|
Reference in New Issue
Block a user