This commit is contained in:
2025-11-07 19:32:02 +08:00
parent d592c9f12e
commit c3acc11f6a
17 changed files with 50 additions and 18 deletions

View File

@@ -39,18 +39,6 @@
#pragma mark - Layout
- (void)layoutSubviews {
[super layoutSubviews];
// 0
if (self.buyButton.currentBackgroundImage == nil) {
CGSize size = self.buyButton.bounds.size;
if (size.width > 0 && size.height > 0) {
UIImage *bg = [UIImage kb_gradientImageWithColors:@[[UIColor colorWithHex:0xE6FFF4], [UIColor colorWithHex:0xA6FFD8]]
locations:nil
size:size
direction:KBGradientDirectionLeftToRight
cornerRadius:size.height * 0.5];
[self.buyButton setBackgroundImage:bg forState:UIControlStateNormal];
}
}
}
#pragma mark - UI
@@ -126,7 +114,7 @@
[self.buyButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.mas_left).offset(62);
make.right.equalTo(self.mas_right).offset(-62);
make.bottom.equalTo(self.mas_bottom).offset(-5);
make.bottom.equalTo(self.mas_bottom).offset(0);
make.height.mas_equalTo(56);
}];
}
@@ -240,7 +228,7 @@
[_buyButton setTitle:@"Recharge Now" forState:UIControlStateNormal];
[_buyButton setTitleColor:[UIColor colorWithHex:0x1B1F1A] forState:UIControlStateNormal];
_buyButton.titleLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
[_buyButton setBackgroundImage:[UIImage imageNamed:@"recharge_now_icon"] forState:UIControlStateNormal];
[_buyButton addTarget:self action:@selector(onTapBuyAction) forControlEvents:UIControlEventTouchUpInside];
}
return _buyButton;