封装KBFont,适配字体

This commit is contained in:
2025-11-25 15:36:16 +08:00
parent 71423df1c0
commit 1eb73f5257
40 changed files with 224 additions and 101 deletions

View File

@@ -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];