如何解决crash" Trapped uncaught exception 'NSInvalidArgumentException', reason: '-[UICTFont intValue]: unrecognized selector sent to instance 0x10244a800' "

先来张图:


E5F91BC9-5574-46B1-B165-CF9B1FB4BB1E.png

关注点:
[UICTFont intValue]
查找所有的有关UIFont的方法,最终在
[bar setTitleTextAttributes:@{
NSForegroundColorAttributeName : [UIColor whiteColor],
NSFontAttributeName : [UIFont systemFontOfSize:kFontSize]
}];
NSFontAttributeName 换成了NSAttributedStringKey,既然是font的大小,你肯定得对应上"NSFontAttributeName"
看到这,心头一万头乌鸦掠过!!!!!
前任,如果大街上遇到你,你别跑!!!!!!

你可能感兴趣的:(如何解决crash" Trapped uncaught exception 'NSInvalidArgumentException', reason: '-[UICTFont intValue]: unrecognized selector sent to instance 0x10244a800' ")