我有一个UITableView,它被分配给由“ArticleNavigation”标识的NavigationController。在我的委托(didFinishLaunchingWithOptions method)
中,我尝试以编程方式创建UItabBar:
main_tab =[[UITabBarController alloc] init];
viewController1 = [[ListViewController alloc]init];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
UINavigationController * nav1=[[storyboard instantiateViewControllerWithIdentifier:@"ArticleNavigation"]initWithRootViewController:viewController1];
tabs_array=[[NSArray alloc]initWithObjects:nav1, nil];
main_tab.viewControllers=tabs_array;
self.window.rootViewController=main_tab;
当我运行我的应用程序并单击一个单元格时,我收到此错误:
Application tried to push a nil view controller on target
请猜猜?