【发布时间】:2011-09-28 10:41:22
【问题描述】:
我在 iOS 3.1.2 中设置 UILabel 字体时遇到此异常,但在 iOS 4 中运行良好,
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: font != nil'
代码行是,
Outbound_Label.font = [UIFont fontWithName:@"DS-Digital" size:24];
DS-Digital 是我的自定义字体。
【问题讨论】:
-
也许你应该检查返回值,似乎它没有找到你的字体。更好地检查资源文件是否正确包含。
标签: iphone uilabel nsexception