iOS:Text Font cannot be applied propertily

This commit is contained in:
pengfei.zhou 2020-04-15 19:09:17 +08:00 committed by osborn
parent 6f89cf440b
commit 5dd4724e3c

View File

@ -109,7 +109,8 @@ - (void)blendView:(UILabel *)view forPropName:(NSString *)name propValue:(id)pro
view.doricLayout.maxHeight = [prop floatValue];
} else if ([name isEqualToString:@"font"]) {
NSString *iconfont = prop;
UIFont *font = [UIFont fontWithName:iconfont size:view.font.pointSize];
UIFont *font = [UIFont fontWithName:[iconfont stringByReplacingOccurrencesOfString:@".ttf" withString:@""]
size:view.font.pointSize];
view.font = font;
} else if ([name isEqualToString:@"lineSpacing"]) {
[[self ensureParagraphStyle] also:^(NSMutableParagraphStyle *it) {