【发布时间】:2011-02-18 10:18:59
【问题描述】:
我在运行我的应用程序时收到以下错误。
'-[NSCFString sizeWithTextStyle:]:无法识别的选择器
我没有在整个项目中使用 sizeWithTextStyle。
那么可能出了什么问题?
我在下面的return pos; 语句中遇到错误
代码:
(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *pos = [[UIView alloc] initWithFrame:CGRectMake(0.0,0.0,320.0,35.0)];
return pos;
}
控制台出错:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString sizeWithTextStyle:]: unrecognized selector sent to instance 0x7044b50'
由于将整个崩溃日志放在这里时出现缩进问题,我将崩溃日志的屏幕截图放在这里
【问题讨论】:
-
很难说没有更多的代码。您能否提供您的应用崩溃的代码行?
-
@Philipp Jaquet:我已经编辑了我的问题并添加了我的代码。我尝试调试代码,发现应用程序因 SIGNAL ABORT 语句而崩溃
标签: iphone objective-c cocoa-touch ios4