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

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