关于Xcode6:[UICTFont _scaledValueForValue:] Crash问题的解决方法
2015-11-18 15:02
204 查看
最近用Xcode6编译了一下以前的一个项目,突然发现在xcode6编译运行,马上机会Crash。
2014-09-16 14:14:15.303 *** Assertion failure in -[UICTFont _scaledValueForValue:], /SourceCache/UIFoundation_Sim/UIFoundation-371/UIFoundation/iOS/UIFont.m:
如果你的项目中存在类似的代码:
估计在xcode6的环境下编译会马上就会Crash掉,我的解决方法如下:
替换成如上的方法就会顺利的编译通过。
2014-09-16 14:14:15.303 *** Assertion failure in -[UICTFont _scaledValueForValue:], /SourceCache/UIFoundation_Sim/UIFoundation-371/UIFoundation/iOS/UIFont.m:
如果你的项目中存在类似的代码:
[UIFont fontWithName:@"HiraKakuProN-W3" size:10]
[UIFontfontWithName:@"HiraKakuProN-W3"size:10] |
[UIFont fontWithDescriptor:[UIFontDescriptor fontDescriptorWithFontAttributes:@{@"NSCTFontUIUsageAttribute" : UIFontTextStyleBody,@"NSFontNameAttribute" : @"HiraKakuProN-W3"}] size:10.0]
[UIFontfontWithDescriptor:[UIFontDescriptorfontDescriptorWithFontAttributes:@{@"NSCTFontUIUsageAttribute":UIFontTextStyleBody,@"NSFontNameAttribute":@"HiraKakuProN-W3"}]size:10.0] |
相关文章推荐
- confluence数据备份与还原
- iOS UIView事件隔层传递 pointInside:withEvent:
- MySQL 错误 1366:1366 Incorrect integer value
- UITextField的左边的占位空格
- UILabel的简单使用介绍
- “无法更新EntitySet“*****”,因为它有一个DefiningQuery,而元素中没有支持当前操作的元素”问题的解决方法
- Getting Started with Play 2, Scala, and Squeryl
- ucGUI移植到msp430f149时底层驱动代码
- requestFocusFromTouch , requestFocus
- 调用系统提供的DownlaodManager时,DownLoadList下载管理UI中出现缩略图显示不完整的问题?
- Leetcode161: Repeated DNA Sequences
- UIView 页面跳转动画
- UIView 模态动画
- UITextFiled时时获取当前输入的字符长度
- UIDatePicker 日期/时间选取器(滚轮)—IOS开发
- android gradle build resources.arsc文件未压缩问题解决
- Loadrunner-soap_request初体验
- private static final long serialVersionUID = 1L;
- 利用huffman树实现字符文档的压缩//to be continued
- setFont for UIButton is deprecated