運行我的應用程序時出現以下錯誤。錯誤:在iPhone SDK中的「 - [NSCFString sizeWithTextStyle:]:無法識別的選擇器」
「 - [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'
由於壓痕問題,而把整個崩潰日誌在這裏,我是P.在的Utting崩潰的屏幕截圖日誌
硬沒有一些更多的代碼來表示。你能提供你的應用程序崩潰的代碼行嗎? – 2011-02-18 10:42:46
@Philipp Jaquet:我編輯了我的問題並添加了我的代碼。我試過調試代碼,發現應用程序崩潰了** SIGNAL ABORT **語句 – 2011-02-18 10:52:52