封装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

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