我有这个代码:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
TabellenDetailViewController *detailViewController2 = [self.storyboard instantiateViewControllerWithIdentifier:@"TabellenDetailViewController"];
Book2 *aBook2 = [books2 objectAtIndex:indexPath.row];
detailViewController2.tea_names = [NSString stringWithFormat:@"%@", aBook2.tea_name];
[self.navigationController pushViewController:detailViewController2 animated:YES];
}
为了更好地理解,我有一个故事板:
导航控制器 -> MasterTableViewController -> DetailMasterTableViewController -> TabelleViewController -> DetailTabelleViewcontroller
它适用于 TabelleViewController,如果我在 TabelleViewController 中选择一个单元格,则程序会因该错误而停止:
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([XMLAppDelegate class])); <--- Here with Thread1:Program received signal: "SIGABRT".
}
}