嗨,我目前已经推动了选择以让我的表格视图推送到详细视图。我也有这个代码来发送选定的表格单元格的名称:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *acell = [tableView cellForRowAtIndexPath:indexPath];
selectedCell = acell.textLabel.text;
DetailViewController *myDetViewCont = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:[NSBundle mainBundle]];
myDetViewCont.navigationItem.title = selectedCell;
[self.navigationController pushViewController:myDetViewCont animated:YES];
}
它构建成功,但在模拟器中它抛出一个错误:
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
Thread: 1 signal: SIGABRT
我查找了类似的问题,但还没有找到解决方案。有什么帮助吗?
好的有关错误的其他信息:
[self.navigationController pushViewController:myDetViewCont animated:YES];