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