当我点击行导航到另一个视图时,它会让我崩溃
"Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<detailInfo 0x6b503d0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key lblText.'
*** First throw call stack:
"
这是我的代码:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
_vcontroler = [ urls objectAtIndex:indexPath.row];
if (!self.detailViewController)
{
self.detailViewController = [[[detailInfo alloc] initWithNibName:@"detailInfo" bundle:nil] autorelease];
}
detailViewController.vcontroler =_vcontroler;
[self.navigationController pushViewController:self.detailViewController animated:YES];
[detailViewController release];
}
答案 0 :(得分:0)
问题是您从视图框架中删除了图形对象而未删除插座连接。选择视图控制器的.xib
,然后选择File's Owner
(左键单击它)并删除lblText
对象的出口连接。建设与发展跑。应该没问题。