封装KBFont,适配字体
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
if (!_contentLabel) {
|
||||
_contentLabel = [UILabel new];
|
||||
_contentLabel.numberOfLines = 0;
|
||||
_contentLabel.font = [UIFont systemFontOfSize:15];
|
||||
_contentLabel.font = [KBFont regular:15];
|
||||
_contentLabel.textColor = [UIColor colorWithWhite:0.15 alpha:1.0];
|
||||
}
|
||||
return _contentLabel;
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
if (!_contentLabel) {
|
||||
_contentLabel = [UILabel new];
|
||||
_contentLabel.numberOfLines = 0;
|
||||
_contentLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_contentLabel.font = [KBFont medium:16];
|
||||
_contentLabel.textColor = [UIColor whiteColor];
|
||||
_contentLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ typedef NS_ENUM(NSInteger, KBSexOption) {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [UILabel new];
|
||||
_titleLabel.text = @"Please Select Your Gender";
|
||||
_titleLabel.font = [UIFont systemFontOfSize:22 weight:UIFontWeightSemibold];
|
||||
_titleLabel.font = [KBFont medium:20];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_titleLabel.numberOfLines = 1;
|
||||
}
|
||||
@@ -303,7 +303,7 @@ typedef NS_ENUM(NSInteger, KBSexOption) {
|
||||
_skipButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_skipButton setTitle:@"Skip" forState:UIControlStateNormal];
|
||||
[_skipButton setTitleColor:[UIColor colorWithHex:KBBlackValue] forState:UIControlStateNormal];
|
||||
_skipButton.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
|
||||
_skipButton.titleLabel.font = [KBFont medium:12];
|
||||
_skipButton.backgroundColor = [UIColor colorWithHex:0xE9F7F4];
|
||||
_skipButton.layer.cornerRadius = 16;
|
||||
_skipButton.layer.masksToBounds = YES;
|
||||
@@ -338,7 +338,7 @@ typedef NS_ENUM(NSInteger, KBSexOption) {
|
||||
if (!_maleLabel) {
|
||||
_maleLabel = [UILabel new];
|
||||
_maleLabel.text = @"Male";
|
||||
_maleLabel.font = [UIFont systemFontOfSize:20 weight:UIFontWeightSemibold];
|
||||
_maleLabel.font = [KBFont medium:20];
|
||||
_maleLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
}
|
||||
return _maleLabel;
|
||||
@@ -366,7 +366,7 @@ typedef NS_ENUM(NSInteger, KBSexOption) {
|
||||
if (!_femaleLabel) {
|
||||
_femaleLabel = [UILabel new];
|
||||
_femaleLabel.text = @"Female";
|
||||
_femaleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightRegular];
|
||||
_femaleLabel.font = [KBFont medium:20];
|
||||
_femaleLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
}
|
||||
return _femaleLabel;
|
||||
@@ -402,7 +402,7 @@ typedef NS_ENUM(NSInteger, KBSexOption) {
|
||||
if (!_otherLabel) {
|
||||
_otherLabel = [UILabel new];
|
||||
_otherLabel.text = @"The Third Gender";
|
||||
_otherLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightRegular];
|
||||
_otherLabel.font = [KBFont medium:20];
|
||||
_otherLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
}
|
||||
return _otherLabel;
|
||||
@@ -413,7 +413,7 @@ typedef NS_ENUM(NSInteger, KBSexOption) {
|
||||
_confirmButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_confirmButton setTitle:@"Turn On The Keyboard" forState:UIControlStateNormal];
|
||||
[_confirmButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_confirmButton.titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightSemibold];
|
||||
_confirmButton.titleLabel.font = [KBFont bold:16];
|
||||
_confirmButton.backgroundColor = [UIColor blackColor];
|
||||
_confirmButton.layer.cornerRadius = 30;
|
||||
_confirmButton.layer.masksToBounds = YES;
|
||||
|
||||
@@ -154,6 +154,7 @@
|
||||
KBTopImageButton *btn = self.featureButtons[i];
|
||||
if (i < count) {
|
||||
btn.textLabel.text = titles[i];
|
||||
btn.textLabel.font = [KBFont regular:12];
|
||||
}
|
||||
UIImage *img = (i < images.count) ? images[i] : nil;
|
||||
btn.iconView.image = img;
|
||||
@@ -188,7 +189,8 @@
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightBold];
|
||||
// _titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightBold];
|
||||
_titleLabel.font = [KBFont bold:18];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:0x1B1F1A];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
@@ -198,7 +200,8 @@
|
||||
- (UILabel *)subTitleLabel {
|
||||
if (!_subTitleLabel) {
|
||||
_subTitleLabel = [[UILabel alloc] init];
|
||||
_subTitleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular];
|
||||
// _subTitleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular];
|
||||
_subTitleLabel.font = [KBFont regular:14];
|
||||
_subTitleLabel.textColor = self.titleLabel.textColor;
|
||||
_subTitleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
@@ -236,7 +239,8 @@
|
||||
_buyButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_buyButton setTitle:KBLocalized(@"Recharge Now") forState:UIControlStateNormal];
|
||||
[_buyButton setTitleColor:[UIColor colorWithHex:0x1B1F1A] forState:UIControlStateNormal];
|
||||
_buyButton.titleLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
||||
// _buyButton.titleLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
||||
_buyButton.titleLabel.font = [KBFont medium:15];
|
||||
[_buyButton setBackgroundImage:[UIImage imageNamed:@"recharge_now_icon"] forState:UIControlStateNormal];
|
||||
[_buyButton addTarget:self action:@selector(onTapBuyAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_titleLabel.font = [KBFont medium:16];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:0x1B1F1A];
|
||||
}
|
||||
return _titleLabel;
|
||||
@@ -130,7 +130,7 @@
|
||||
- (UILabel *)subLabel {
|
||||
if (!_subLabel) {
|
||||
_subLabel = [[UILabel alloc] init];
|
||||
_subLabel.font = [UIFont systemFontOfSize:12];
|
||||
_subLabel.font = [KBFont regular:12];
|
||||
_subLabel.textColor = [UIColor colorWithHex:0x9A9A9A];
|
||||
_subLabel.numberOfLines = 2;
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [UILabel new];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:0x1B1F1A];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_titleLabel.font = [KBFont medium:16];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _titleLabel;
|
||||
@@ -169,7 +169,7 @@
|
||||
if (!_descLabel) {
|
||||
_descLabel = [UILabel new];
|
||||
_descLabel.textColor = [UIColor colorWithHex:0x9A9A9A];
|
||||
_descLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightRegular];
|
||||
_descLabel.font = [KBFont regular:12];
|
||||
_descLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_descLabel.numberOfLines = 2;
|
||||
}
|
||||
@@ -180,7 +180,7 @@
|
||||
if (!_peopleLabel) {
|
||||
_peopleLabel = [UILabel new];
|
||||
_peopleLabel.textColor = [UIColor colorWithHex:KBColorValue];
|
||||
_peopleLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightRegular];
|
||||
_peopleLabel.font = [KBFont regular:10];
|
||||
_peopleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_peopleLabel.numberOfLines = 2;
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [UILabel new];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_titleLabel.font = [KBFont medium:16];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_titleLabel.text = @"High EQ"; // 默认文案
|
||||
}
|
||||
@@ -186,7 +186,7 @@
|
||||
_downloadLabel = [UILabel new];
|
||||
_downloadLabel.textColor = [UIColor colorWithHex:KBColorValue];
|
||||
_downloadLabel.backgroundColor = [UIColor colorWithHex:0xEDFFFD];
|
||||
_downloadLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightMedium];
|
||||
_downloadLabel.font = [KBFont regular:13];
|
||||
_downloadLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_downloadLabel.text = @"Download: 1 Million";
|
||||
}
|
||||
@@ -207,7 +207,7 @@
|
||||
if (!_descLabel) {
|
||||
_descLabel = [UILabel new];
|
||||
_descLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_descLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold];
|
||||
_descLabel.font = [KBFont medium:14];
|
||||
_descLabel.numberOfLines = 0;
|
||||
_descLabel.text = @"Be Neither Too Close\nNor Too Distant";
|
||||
}
|
||||
@@ -219,7 +219,7 @@
|
||||
_saveButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_saveButton setTitle:@"Save" forState:UIControlStateNormal];
|
||||
[_saveButton setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
|
||||
_saveButton.titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightSemibold];
|
||||
_saveButton.titleLabel.font = [KBFont medium:16];
|
||||
_saveButton.backgroundColor = [UIColor colorWithRed:0.02 green:0.75 blue:0.67 alpha:1.0];
|
||||
_saveButton.layer.cornerRadius = 24.0;
|
||||
_saveButton.layer.masksToBounds = YES;
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.textColor = [UIColor colorWithWhite:0.1 alpha:1];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_titleLabel.font = [KBFont medium:13];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _titleLabel;
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
_titleLabel = [UILabel new];
|
||||
_titleLabel.text = KBLocalized(@"Change The Nickname");
|
||||
_titleLabel.textColor = [UIColor blackColor];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:22 weight:UIFontWeightBold];
|
||||
_titleLabel.font = [KBFont medium:16];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
@@ -159,7 +159,7 @@
|
||||
if (!_textField) {
|
||||
_textField = [[UITextField alloc] init];
|
||||
_textField.clearButtonMode = UITextFieldViewModeWhileEditing;
|
||||
_textField.font = [UIFont systemFontOfSize:18 weight:UIFontWeightSemibold];
|
||||
_textField.font = [KBFont medium:16];
|
||||
_textField.textColor = [UIColor blackColor];
|
||||
_textField.placeholder = KBLocalized(@"Please Enter The Modified Nickname");
|
||||
}
|
||||
@@ -171,8 +171,8 @@
|
||||
_saveButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_saveButton setTitle:KBLocalized(@"Save") forState:UIControlStateNormal];
|
||||
[_saveButton setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
|
||||
_saveButton.titleLabel.font = [UIFont systemFontOfSize:20 weight:UIFontWeightSemibold];
|
||||
_saveButton.backgroundColor = [UIColor colorWithRed:0.02 green:0.75 blue:0.67 alpha:1.0];
|
||||
_saveButton.titleLabel.font = [KBFont medium:16];
|
||||
_saveButton.backgroundColor = [UIColor colorWithHex:KBColorValue];
|
||||
_saveButton.layer.cornerRadius = 28.0; _saveButton.layer.masksToBounds = YES; // 胶囊按钮
|
||||
[_saveButton addTarget:self action:@selector(onTapSave) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
if (![label isKindOfClass:UILabel.class]) {
|
||||
label = [[UILabel alloc] init];
|
||||
label.textAlignment = NSTextAlignmentCenter;
|
||||
label.font = [UIFont systemFontOfSize:20 weight:UIFontWeightSemibold];
|
||||
label.font = [KBFont medium:16];
|
||||
}
|
||||
NSString *name = self.items[row][@"name"] ?: @"";
|
||||
label.text = name;
|
||||
@@ -178,7 +178,7 @@
|
||||
_titleLabel = [UILabel new];
|
||||
_titleLabel.text = @"Modify Gender";
|
||||
_titleLabel.textColor = [UIColor blackColor];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:22 weight:UIFontWeightBold];
|
||||
_titleLabel.font = [KBFont medium:16];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
@@ -222,7 +222,7 @@
|
||||
_saveButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_saveButton setTitle:@"Save" forState:UIControlStateNormal];
|
||||
[_saveButton setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
|
||||
_saveButton.titleLabel.font = [UIFont systemFontOfSize:20 weight:UIFontWeightSemibold];
|
||||
_saveButton.titleLabel.font = [KBFont medium:16];
|
||||
_saveButton.backgroundColor = [UIColor colorWithRed:0.02 green:0.75 blue:0.67 alpha:1.0];
|
||||
_saveButton.layer.cornerRadius = 23.0; _saveButton.layer.masksToBounds = YES;
|
||||
[_saveButton addTarget:self action:@selector(onTapSave) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
@@ -107,8 +107,8 @@
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [UILabel new];
|
||||
_titleLabel.text = KBLocalized(@"Settings"); // 大标题
|
||||
_titleLabel.font = [UIFont systemFontOfSize:30 weight:UIFontWeightBold];
|
||||
_titleLabel.text = KBLocalized(@"Personal"); // 大标题
|
||||
_titleLabel.font = [KBFont bold:30];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:0x1B1F1A];
|
||||
}
|
||||
return _titleLabel;
|
||||
@@ -118,7 +118,7 @@
|
||||
if (!_keyboardBtn) {
|
||||
_keyboardBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_keyboardBtn setTitle:KBLocalized(@"My Keyboard") forState:UIControlStateNormal];
|
||||
_keyboardBtn.titleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightSemibold];
|
||||
_keyboardBtn.titleLabel.font = [KBFont medium:10];
|
||||
[_keyboardBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_keyboardBtn.backgroundColor = [UIColor colorWithHex:KBColorValue];
|
||||
_keyboardBtn.layer.cornerRadius = 17;
|
||||
@@ -129,7 +129,7 @@
|
||||
if (kbImg) {
|
||||
[_keyboardBtn setImage:kbImg forState:UIControlStateNormal];
|
||||
_keyboardBtn.imageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
CGFloat spacing = 6.0;
|
||||
CGFloat spacing = 3.0;
|
||||
_keyboardBtn.contentEdgeInsets = UIEdgeInsetsMake(0, spacing, 0, spacing);
|
||||
_keyboardBtn.titleEdgeInsets = UIEdgeInsetsMake(0, spacing, 0, -spacing);
|
||||
}
|
||||
@@ -156,8 +156,8 @@
|
||||
if (!_nameLabel) {
|
||||
_nameLabel = [UILabel new];
|
||||
_nameLabel.text = @"Notice";
|
||||
_nameLabel.font = [UIFont systemFontOfSize:20 weight:UIFontWeightSemibold];
|
||||
_nameLabel.textColor = [UIColor colorWithHex:0x1B1F1A];
|
||||
_nameLabel.font = [KBFont medium:20];
|
||||
_nameLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
}
|
||||
return _nameLabel;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
+ (CGSize)sizeForEmoji:(NSString *)emoji title:(NSString *)title {
|
||||
// 固定高度 44,宽度 = 左右内边距(12+12) + Emoji 宽(按 20 号字估算) + 间距(8) + 文案宽
|
||||
UIFont *emojiFont = [UIFont systemFontOfSize:20];
|
||||
UIFont *titleFont = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
UIFont *titleFont = [KBFont regular:13];
|
||||
|
||||
CGFloat emojiW = 0;
|
||||
if (emoji.length > 0) {
|
||||
@@ -128,7 +128,7 @@
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [UILabel new];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_titleLabel.font = [KBFont regular:13];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:0x1B1F1A];
|
||||
}
|
||||
return _titleLabel;
|
||||
|
||||
@@ -98,8 +98,8 @@
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [UILabel new];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:16];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:0x222222];
|
||||
_titleLabel.font = [KBFont medium:16];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_titleLabel.text = @"Title";
|
||||
}
|
||||
return _titleLabel;
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [UILabel new];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightRegular];
|
||||
_titleLabel.font = [KBFont medium:16];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
@@ -158,7 +158,7 @@
|
||||
if (!_valueLabel) {
|
||||
_valueLabel = [UILabel new];
|
||||
_valueLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_valueLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_valueLabel.font = [KBFont bold:16];
|
||||
_valueLabel.textAlignment = NSTextAlignmentRight;
|
||||
[_valueLabel setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:17 weight:UIFontWeightSemibold];
|
||||
_titleLabel.font = [KBFont medium:16];
|
||||
_titleLabel.textColor = [UIColor whiteColor];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
@@ -143,7 +143,7 @@
|
||||
- (UILabel *)priceLabel {
|
||||
if (!_priceLabel) {
|
||||
_priceLabel = [[UILabel alloc] init];
|
||||
_priceLabel.font = [UIFont systemFontOfSize:17 weight:UIFontWeightSemibold];
|
||||
_priceLabel.font = [KBFont medium:16];
|
||||
_priceLabel.textColor = [UIColor whiteColor];
|
||||
_priceLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
|
||||
@@ -57,8 +57,8 @@
|
||||
- (UILabel *)leftLabel {
|
||||
if (!_leftLabel) {
|
||||
_leftLabel = [UILabel new];
|
||||
_leftLabel.textColor = [UIColor colorWithHex:0x1B1F1A];
|
||||
_leftLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightSemibold];
|
||||
_leftLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_leftLabel.font = [KBFont medium:16];
|
||||
_leftLabel.text = @"Dopamine";
|
||||
}
|
||||
return _leftLabel;
|
||||
@@ -67,7 +67,7 @@
|
||||
if (!_rightLabel) {
|
||||
_rightLabel = [UILabel new];
|
||||
_rightLabel.textColor = [UIColor colorWithHex:KBColorValue];
|
||||
_rightLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
||||
_rightLabel.font = [KBFont regular:13];
|
||||
_rightLabel.textAlignment = NSTextAlignmentRight;
|
||||
_rightLabel.text = @"Download: 1 Million";
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [UILabel new];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:0x1B1F1A];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightSemibold];
|
||||
_titleLabel.font = [KBFont medium:14];
|
||||
_titleLabel.text = @"Recommended Skin";
|
||||
}
|
||||
return _titleLabel;
|
||||
|
||||
@@ -167,8 +167,8 @@
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [UILabel new];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:0x333333];
|
||||
_titleLabel.font = [KBFont regular:14];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_titleLabel.text = @"Dopamine";
|
||||
}
|
||||
return _titleLabel;
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
_textView = [[UITextView alloc] init];
|
||||
_textView.delegate = self;
|
||||
_textView.backgroundColor = [UIColor clearColor];
|
||||
_textView.font = [UIFont systemFontOfSize:16];
|
||||
_textView.font = [KBFont medium:14];
|
||||
_textView.textColor = [UIColor blackColor];
|
||||
_textView.textContainerInset = UIEdgeInsetsZero;
|
||||
_textView.textContainer.lineFragmentPadding = 0;
|
||||
@@ -129,7 +129,7 @@
|
||||
if (!_placeholderLabel) {
|
||||
_placeholderLabel = [UILabel new];
|
||||
_placeholderLabel.textColor = [UIColor colorWithWhite:0.75 alpha:1.0];
|
||||
_placeholderLabel.font = [UIFont systemFontOfSize:16];
|
||||
_placeholderLabel.font = [KBFont medium:14];
|
||||
_placeholderLabel.text = KBLocalized(@"Please Enter The Content");
|
||||
}
|
||||
return _placeholderLabel;
|
||||
@@ -138,8 +138,8 @@
|
||||
- (UILabel *)countLabel {
|
||||
if (!_countLabel) {
|
||||
_countLabel = [UILabel new];
|
||||
_countLabel.textColor = [UIColor colorWithWhite:0.7 alpha:1.0];
|
||||
_countLabel.font = [UIFont systemFontOfSize:14];
|
||||
_countLabel.textColor = [UIColor colorWithHex:0xACACAC];
|
||||
_countLabel.font = [KBFont regular:13];
|
||||
_countLabel.textAlignment = NSTextAlignmentRight;
|
||||
_countLabel.text = @"0/100";
|
||||
}
|
||||
@@ -151,7 +151,7 @@
|
||||
_commitButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_commitButton setTitle:KBLocalized(@"Commit") forState:UIControlStateNormal];
|
||||
[_commitButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_commitButton.titleLabel.font = [UIFont systemFontOfSize:20 weight:UIFontWeightSemibold];
|
||||
_commitButton.titleLabel.font = [KBFont medium:16];
|
||||
// 使用与修改昵称弹窗相近的主色
|
||||
_commitButton.backgroundColor = [UIColor colorWithRed:0.02 green:0.75 blue:0.67 alpha:1.0];
|
||||
_commitButton.layer.cornerRadius = 28.0;
|
||||
|
||||
@@ -261,7 +261,7 @@ static NSString * const kKBMyKeyboardCellId = @"kKBMyKeyboardCellId";
|
||||
if (!_saveButton) {
|
||||
_saveButton = [UIButton buttonWithType:UIButtonTypeSystem];
|
||||
[_saveButton setTitle:KBLocalized(@"Save") forState:UIControlStateNormal];
|
||||
_saveButton.titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightSemibold];
|
||||
_saveButton.titleLabel.font = [KBFont medium:16];
|
||||
[_saveButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_saveButton.backgroundColor = [UIColor colorWithHex:KBColorValue];
|
||||
_saveButton.layer.cornerRadius = 25;
|
||||
|
||||
@@ -75,8 +75,8 @@
|
||||
- (UILabel *)noticeTitleLabel {
|
||||
if (!_noticeTitleLabel) {
|
||||
_noticeTitleLabel = [UILabel new];
|
||||
_noticeTitleLabel.textColor = [UIColor blackColor];
|
||||
_noticeTitleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightSemibold];
|
||||
_noticeTitleLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_noticeTitleLabel.font = [KBFont medium:16];
|
||||
// 文案可根据需要在 Localizable.strings 中配置多语言
|
||||
_noticeTitleLabel.text = KBLocalized(@"Notification Setting");
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
_modifyLabel = [UILabel new];
|
||||
_modifyLabel.text = @"Modify";
|
||||
_modifyLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_modifyLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightSemibold];
|
||||
_modifyLabel.font = [KBFont bold:18];
|
||||
}
|
||||
return _modifyLabel;
|
||||
}
|
||||
@@ -281,9 +281,9 @@
|
||||
- (UIButton *)logoutBtn {
|
||||
if (!_logoutBtn) {
|
||||
_logoutBtn = [UIButton buttonWithType:UIButtonTypeSystem];
|
||||
[_logoutBtn setTitle:@"Log Out" forState:UIControlStateNormal];
|
||||
[_logoutBtn setTitle:KBLocalized(@"Log Out") forState:UIControlStateNormal];
|
||||
[_logoutBtn setTitleColor:[UIColor colorWithHex:0xFF0000] forState:UIControlStateNormal];
|
||||
_logoutBtn.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_logoutBtn.titleLabel.font = [KBFont medium:16];
|
||||
_logoutBtn.backgroundColor = UIColor.whiteColor;
|
||||
_logoutBtn.layer.cornerRadius = 12; _logoutBtn.layer.masksToBounds = YES;
|
||||
[_logoutBtn addTarget:self action:@selector(onTapLogout) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
@@ -281,8 +281,8 @@ static NSString * const kMySkinCellId = @"kMySkinCellId";
|
||||
- (UILabel *)selectedLabel {
|
||||
if (!_selectedLabel) {
|
||||
_selectedLabel = [UILabel new];
|
||||
_selectedLabel.textColor = [UIColor colorWithHex:0x666666];
|
||||
_selectedLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
|
||||
_selectedLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_selectedLabel.font = [KBFont medium:13];
|
||||
// _selectedLabel.text = @"Selected: 0 Skins";
|
||||
}
|
||||
return _selectedLabel;
|
||||
@@ -292,7 +292,7 @@ static NSString * const kMySkinCellId = @"kMySkinCellId";
|
||||
if (!_deleteButton) {
|
||||
_deleteButton = [UIButton buttonWithType:UIButtonTypeSystem];
|
||||
[_deleteButton setTitle:KBLocalized(@"Delete") forState:UIControlStateNormal];
|
||||
_deleteButton.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_deleteButton.titleLabel.font = [KBFont medium:13];
|
||||
_deleteButton.layer.cornerRadius = 18;
|
||||
_deleteButton.layer.borderWidth = 1;
|
||||
_deleteButton.clipsToBounds = YES;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
if (!_textField) {
|
||||
_textField = [[UITextField alloc] init];
|
||||
_textField.delegate = self;
|
||||
_textField.font = [UIFont systemFontOfSize:15];
|
||||
_textField.font = [KBFont medium:13];
|
||||
_textField.textColor = [UIColor colorWithHex:0x1B1F1A];
|
||||
_textField.clearButtonMode = UITextFieldViewModeWhileEditing;
|
||||
_textField.returnKeyType = UIReturnKeySearch;
|
||||
@@ -104,7 +104,7 @@
|
||||
- (UIButton *)searchButton {
|
||||
if (!_searchButton) {
|
||||
_searchButton = [UIButton buttonWithType:UIButtonTypeSystem];
|
||||
_searchButton.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_searchButton.titleLabel.font = [KBFont regular:14];
|
||||
[_searchButton setTitle:@"Search" forState:UIControlStateNormal];
|
||||
// 绿色样式
|
||||
[_searchButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightSemibold];
|
||||
_titleLabel.font = [KBFont medium:14];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:0x1B1F1A];
|
||||
}
|
||||
return _titleLabel;
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightSemibold];
|
||||
_titleLabel.font = [KBFont regular:14];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
}
|
||||
return _titleLabel;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
+ (CGSize)sizeForText:(NSString *)text {
|
||||
if (text.length == 0) { return CGSizeMake(40, 32); }
|
||||
CGSize s = [text sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14]}];
|
||||
CGSize s = [text sizeWithAttributes:@{NSFontAttributeName:[KBFont regular:13]}];
|
||||
// 两侧内边距 12 + 12,高度固定 32
|
||||
return CGSizeMake(ceil(s.width) + 24, 32);
|
||||
}
|
||||
@@ -40,7 +40,7 @@
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
_titleLabel.font = [KBFont regular:13];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:0x1B1F1A];
|
||||
}
|
||||
return _titleLabel;
|
||||
|
||||
@@ -192,8 +192,8 @@
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [UILabel new];
|
||||
_titleLabel.numberOfLines = 0;
|
||||
_titleLabel.text = @"Points\nMall"; // 两行展示
|
||||
_titleLabel.font = [UIFont systemFontOfSize:30 weight:UIFontWeightBold];
|
||||
_titleLabel.text = KBLocalized(@"Points\nMall"); // 两行展示
|
||||
_titleLabel.font = [KBFont medium:22];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:0x1B1F1A];
|
||||
}
|
||||
return _titleLabel;
|
||||
@@ -254,9 +254,9 @@
|
||||
- (UILabel *)myPointsLabel {
|
||||
if (!_myPointsLabel) {
|
||||
_myPointsLabel = [UILabel new];
|
||||
_myPointsLabel.text = @"My Points";
|
||||
_myPointsLabel.text = KBLocalized(@"My Points");
|
||||
_myPointsLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_myPointsLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold];
|
||||
_myPointsLabel.font = [KBFont regular:14];
|
||||
}
|
||||
return _myPointsLabel;
|
||||
}
|
||||
@@ -274,7 +274,7 @@
|
||||
_amountLabel = [UILabel new];
|
||||
_amountLabel.text = @"88.00";
|
||||
_amountLabel.textColor = [UIColor colorWithHex:KBColorValue];
|
||||
_amountLabel.font = [UIFont systemFontOfSize:40 weight:UIFontWeightBold];
|
||||
_amountLabel.font = [KBFont bold:40];
|
||||
_amountLabel.adjustsFontSizeToFitWidth = YES;
|
||||
// _amountLabel.minimumScaleFactor = 0.7;
|
||||
}
|
||||
@@ -284,9 +284,9 @@
|
||||
- (UIButton *)rechargeButton {
|
||||
if (!_rechargeButton) {
|
||||
_rechargeButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_rechargeButton setTitle:@"Recharge" forState:UIControlStateNormal];
|
||||
[_rechargeButton setTitle:KBLocalized(@"Recharge") forState:UIControlStateNormal];
|
||||
[_rechargeButton setTitleColor:[UIColor colorWithHex:KBBlackValue] forState:UIControlStateNormal];
|
||||
_rechargeButton.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold];
|
||||
_rechargeButton.titleLabel.font = [KBFont medium:13];
|
||||
UIImage *bg = [UIImage imageNamed:@"recharge_btn_bg"];
|
||||
[_rechargeButton setBackgroundImage:bg forState:UIControlStateNormal];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user