封装KBFont,适配字体
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user