我是iPhone开发中的新手,我正在尝试使用xcode 4.2创建单一视图应用程序,我想从一个视图移动到另一个视图。有没有办法在不使用故事板的情况下将视图从一个推送到另一个?
答案 0 :(得分:4)
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];
有关详情,请查看此tutorial