简单的问题..。我的应用程序从一个带有UIViewController的UINavigationController开始(当然),但是当一个按钮被按下时,我希望呈现另一个UINavigationController。
我会这样做吗:
[self.navigationController presentViewController:AnotherNavigationController animated:YES completion:nil];或者:
[self presentViewController:AnotherNavigationController animated:YES completion:nil];两种方式都有效..。但我不确定哪一个是正确的..。而且,我似乎不能让BarButtonItem在navigationcontroller出现后出现
PS。navigationcontroller有一个带有两个选项卡视图的tab控制器
在进阶时谢谢!
发布于 2013-07-31 12:21:22
试试这个:
[self.navigationController pushViewController:AnotherNavigationController animated:YES];请改用推式分段。
发布于 2013-07-31 13:05:39
尝试以下代码:
登录成功后
UIStoryboard *Story_TabController = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]
UIViewController *class1 = [Story_TabController instantiateViewControllerWithIdentifier:@"Feed_ViewController"];
UIViewController *class = [Story_TabController instantiateViewControllerWithIdentifier:@"FindFriends_ViewController"];
UINavigationController *nav_profile=[[UINavigationController alloc]initWithRootViewController:class1];
UINavigationController *nav_post=[[UINavigationController alloc]initWithRootViewController:class2];
Tab_controller.viewControllers=[NSArray arrayWithObjects:nav_profile,nav_post, nil];
Tab_controller.selectedIndex=0;
[self.navigationController pushViewController:Tab_controller animated:YES];https://stackoverflow.com/questions/17961511
复制相似问题