iOS:fix when text font is customized,set fontStyle cause font change to system font

This commit is contained in:
pengfei.zhou 2021-08-12 16:00:38 +08:00 committed by osborn
parent 1996ec2ed7
commit e6637b82de

View File

@ -111,7 +111,7 @@ - (void)blendView:(UILabel *)view forPropName:(NSString *)name propValue:(id)pro
if (fontDescriptor) {
font = [UIFont fontWithDescriptor:fontDescriptor size:0];
} else {
font = [UIFont systemFontOfSize:view.font.pointSize];
font = [UIFont fontWithName:font.fontName size:font.pointSize];
}
view.font = font;
} else if ([name isEqualToString:@"maxWidth"]) {