封装KBFont,适配字体
This commit is contained in:
@@ -211,7 +211,7 @@
|
||||
if (!_coinLabel) {
|
||||
_coinLabel = [UILabel new];
|
||||
_coinLabel.text = @"690";
|
||||
_coinLabel.font = [UIFont systemFontOfSize:20 weight:UIFontWeightBold];
|
||||
_coinLabel.font = [KBFont bold:20];
|
||||
_coinLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
}
|
||||
return _coinLabel;
|
||||
@@ -221,7 +221,7 @@
|
||||
if (!_priceLabel) {
|
||||
_priceLabel = [UILabel new];
|
||||
_priceLabel.text = @"$6.90";
|
||||
_priceLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold];
|
||||
_priceLabel.font = [KBFont medium:18];
|
||||
_priceLabel.textColor = [UIColor colorWithHex:KBColorValue];
|
||||
}
|
||||
return _priceLabel;
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.text = @"Become a member of LOVE KEY";
|
||||
_titleLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:25 weight:UIFontWeightBold];
|
||||
_titleLabel.font = [KBFont bold:18];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
@@ -204,7 +204,7 @@
|
||||
_desLabel = [[UILabel alloc] init];
|
||||
_desLabel.text = @"Unlock all functions";
|
||||
_desLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_desLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightBold];
|
||||
_desLabel.font = [KBFont medium:14];
|
||||
}
|
||||
return _desLabel;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
if (!_nameLabel) {
|
||||
_nameLabel = [UILabel new];
|
||||
_nameLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_nameLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold];
|
||||
_nameLabel.font = [KBFont medium:13];
|
||||
_nameLabel.text = @"Sdsd666";
|
||||
}
|
||||
return _nameLabel;
|
||||
@@ -114,8 +114,8 @@
|
||||
- (UILabel *)contentLabel {
|
||||
if (!_contentLabel) {
|
||||
_contentLabel = [UILabel new];
|
||||
_contentLabel.textColor = [UIColor colorWithWhite:0.25 alpha:1.0];
|
||||
_contentLabel.font = [UIFont systemFontOfSize:12];
|
||||
_contentLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_contentLabel.font = [KBFont regular:10];
|
||||
_contentLabel.numberOfLines = 2;
|
||||
_contentLabel.text = @"I Highly Recommend This App. It Taught Me How To Chat";
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
_titleLabel = [UILabel new];
|
||||
_titleLabel.text = @"Monthly Subscription";
|
||||
_titleLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold];
|
||||
_titleLabel.font = [KBFont medium:13];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
@@ -126,7 +126,7 @@
|
||||
_priceLabel = [UILabel new];
|
||||
_priceLabel.text = @"$4.49";
|
||||
_priceLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_priceLabel.font = [UIFont systemFontOfSize:20 weight:UIFontWeightBold];
|
||||
_priceLabel.font = [KBFont bold:20];
|
||||
}
|
||||
return _priceLabel;
|
||||
}
|
||||
@@ -134,7 +134,7 @@
|
||||
if (!_strikeLabel) {
|
||||
_strikeLabel = [UILabel new];
|
||||
_strikeLabel.text = @"$4.49";
|
||||
_strikeLabel.font = [UIFont systemFontOfSize:20 weight:UIFontWeightSemibold];
|
||||
_strikeLabel.font = [KBFont medium:20];
|
||||
_strikeLabel.textColor = [UIColor colorWithWhite:0.7 alpha:1.0];
|
||||
}
|
||||
return _strikeLabel;
|
||||
|
||||
@@ -50,7 +50,7 @@ static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.view);
|
||||
}];
|
||||
self.kb_titleLabel.text = @"Recharge";
|
||||
self.kb_titleLabel.text = KBLocalized(@"Points Recharge");
|
||||
|
||||
// 默认数据(演示)
|
||||
self.data = @[
|
||||
@@ -123,7 +123,7 @@ static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
|
||||
}];
|
||||
[self.agreementLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.equalTo(self.view);
|
||||
make.bottom.equalTo(self.agreementButton.mas_top).offset(-8);
|
||||
make.bottom.equalTo(self.agreementButton.mas_top).offset(0);
|
||||
}];
|
||||
|
||||
// 底部按钮
|
||||
@@ -261,8 +261,8 @@ static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
|
||||
- (UILabel *)myPointsTitleLabel {
|
||||
if (!_myPointsTitleLabel) {
|
||||
_myPointsTitleLabel = [UILabel new];
|
||||
_myPointsTitleLabel.text = @"My Points";
|
||||
_myPointsTitleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_myPointsTitleLabel.text = KBLocalized(@"My Points");
|
||||
_myPointsTitleLabel.font = [KBFont medium:14];
|
||||
_myPointsTitleLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
}
|
||||
return _myPointsTitleLabel;
|
||||
@@ -272,7 +272,7 @@ static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
|
||||
if (!_pointsLabel) {
|
||||
_pointsLabel = [UILabel new];
|
||||
_pointsLabel.text = @"4230"; // 示例值
|
||||
_pointsLabel.font = [UIFont systemFontOfSize:36 weight:UIFontWeightBold];
|
||||
_pointsLabel.font = [KBFont bold:30];
|
||||
_pointsLabel.textColor = [UIColor colorWithHex:KBColorValue];
|
||||
}
|
||||
return _pointsLabel;
|
||||
@@ -298,7 +298,8 @@ static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
|
||||
if (!_rechargeLabel) {
|
||||
_rechargeLabel = [UILabel new];
|
||||
_rechargeLabel.text = KBLocalized(@"Recharge Now");
|
||||
_rechargeLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
// _rechargeLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_rechargeLabel.font = [KBFont medium:14];
|
||||
_rechargeLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
}
|
||||
return _rechargeLabel;
|
||||
@@ -333,7 +334,8 @@ static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
|
||||
_payButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_payButton setTitle:KBLocalized(@"Recharge Now") forState:UIControlStateNormal];
|
||||
[_payButton setTitleColor:[UIColor colorWithHex:KBBlackValue] forState:UIControlStateNormal];
|
||||
_payButton.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
// _payButton.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_payButton.titleLabel.font = [KBFont medium:15];
|
||||
// 使用现有的切图(若不存在可退化为渐变图片)
|
||||
UIImage *bg = [UIImage imageNamed:@"recharge_now_icon"];
|
||||
if (bg) {
|
||||
@@ -352,7 +354,8 @@ static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
|
||||
_agreementLabel = [UILabel new];
|
||||
|
||||
_agreementLabel.text = KBLocalized(@"By clicking Pay, you indicate your agreement to the"); // 简化文案
|
||||
_agreementLabel.font = [UIFont systemFontOfSize:11 weight:UIFontWeightRegular];
|
||||
// _agreementLabel.font = [UIFont systemFontOfSize:11 weight:UIFontWeightRegular];
|
||||
_agreementLabel.font = [KBFont regular:12];
|
||||
_agreementLabel.textColor = [UIColor colorWithWhite:0.45 alpha:1.0];
|
||||
}
|
||||
return _agreementLabel;
|
||||
@@ -362,8 +365,8 @@ static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
|
||||
_agreementButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_agreementButton setTitle:KBLocalized(@"《Embership Agreement》") forState:UIControlStateNormal];
|
||||
[_agreementButton setTitleColor:[UIColor colorWithHex:KBColorValue] forState:UIControlStateNormal];
|
||||
_agreementButton.titleLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightSemibold];
|
||||
|
||||
// _agreementButton.titleLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightSemibold];
|
||||
_agreementButton.titleLabel.font = [KBFont regular:12];
|
||||
[_agreementButton addTarget:self action:@selector(agreementButtonAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _agreementButton;
|
||||
|
||||
@@ -72,7 +72,7 @@ static NSString * const kKBVipReviewListCellId = @"kKBVipReviewListCellId";
|
||||
}];
|
||||
[self.agreementLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.equalTo(self.view);
|
||||
make.bottom.equalTo(self.agreementButton.mas_top).offset(-8);
|
||||
make.bottom.equalTo(self.agreementButton.mas_top).offset(0);
|
||||
}];
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.equalTo(self.view);
|
||||
@@ -267,7 +267,8 @@ static NSString * const kKBVipReviewListCellId = @"kKBVipReviewListCellId";
|
||||
_payButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_payButton setTitle:KBLocalized(@"Recharge Now") forState:UIControlStateNormal];
|
||||
[_payButton setTitleColor:[UIColor colorWithHex:KBBlackValue] forState:UIControlStateNormal];
|
||||
_payButton.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
// _payButton.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_payButton.titleLabel.font = [KBFont medium:15];
|
||||
UIImage *bg = [UIImage imageNamed:@"recharge_now_icon"];
|
||||
if (bg) {
|
||||
[_payButton setBackgroundImage:bg forState:UIControlStateNormal];
|
||||
@@ -285,7 +286,7 @@ static NSString * const kKBVipReviewListCellId = @"kKBVipReviewListCellId";
|
||||
if (!_agreementLabel) {
|
||||
_agreementLabel = [UILabel new];
|
||||
_agreementLabel.text = @"By clicking \"Pay\", you indicate your agreement to the";
|
||||
_agreementLabel.font = [UIFont systemFontOfSize:12];
|
||||
_agreementLabel.font = [KBFont regular:12];
|
||||
_agreementLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
}
|
||||
return _agreementLabel;
|
||||
@@ -296,7 +297,7 @@ static NSString * const kKBVipReviewListCellId = @"kKBVipReviewListCellId";
|
||||
_agreementButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_agreementButton setTitle:@"《Embership Agreement》" forState:UIControlStateNormal];
|
||||
[_agreementButton setTitleColor:[UIColor colorWithHex:KBColorValue] forState:UIControlStateNormal];
|
||||
_agreementButton.titleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightSemibold];
|
||||
_agreementButton.titleLabel.font = [KBFont regular:12];
|
||||
[_agreementButton addTarget:self action:@selector(agreementButtonAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _agreementButton;
|
||||
|
||||
Reference in New Issue
Block a user