控制台打印报错:
CoreText note: Client requested name ".SFUI-Regular", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[UIFont systemFontOfSize:].
处理方式:
全局搜索 CTFontCreateWithName,fontName 由".SFUI-Regular"替换成"TimesNewRomanPSMT"
NSString *fontName = self.titleLabel.font.fontName;
if ([self.titleLabel.font.fontName isEqualToString:@".SFUI-Regular"]) {
fontName = @"TimesNewRomanPSMT";
}
CTFontRef ctfontForTitle = CTFontCreateWithName((CFStringRef)fontName, self.titleLabel.font.pointSize, NULL);
参考:http://591xt.com/2020/09/09/Client-requested-name-SFUI-Regular/
网友评论