tableview セルが押されたときに、tableviewを使用して、ナビゲーション コントローラーのストーリーボードとルート ビュー コントローラーを持つ collectionviewcontroller を開こうとしています。しかし、エラーメッセージが表示されます
アプリケーションが nil View Controller をターゲットにプッシュしようとした
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UIViewController *viewController;
switch (indexPath.row) {
case PDF:
viewController = [[[PDFExampleViewController alloc] init]autorelease];
break;
case IMAGE:
//Rootviewcontroller of the navigation controller have no identifier. showDetail is the segue of the rootviewcontroller.
viewController = [self.storyboard instantiateViewControllerWithIdentifier:@"showDetail"];
break;
case PROCEDURAL:
viewController = [[[ProceduralExampleViewController alloc] init] autorelease];
break;
default:
viewController = [[[UIViewController alloc] init] autorelease];
}
[self.navigationController pushViewController:viewController animated:YES];
}
手伝ってくれてありがとう。