如何在xcode 4.2中创建基于视图的应用程序,而不使用故事板



我是iPhone开发的新手,我试图使用xcode 4.2创建单视图应用程序,我想从一个视图移动到另一个视图。有没有办法在不使用storyboard的情况下将视图从一个推到另一个?

使用UINavigationController

MySub1ViewController *mySub1ViewController = [[MySub1ViewController alloc] init];
//Push it to the top of the navigation controllers stack
[[self navigationController] pushViewController:mySub1ViewController animated:YES];
//Pop viewController from the view stack
[[self navigationController] popViewControllerAnimated:(BOOL)YES];

更多信息请查看本教程

相关内容

最新更新