在我的应用程序中,我想创建一个教程来展示如何使用该应用程序。
为此,我使用 navcontroller.presentViewController
呈现了一个 View Controller ,它具有表单外观。我想将 viewcontroller
更改为另一个,但我不知道如何操作。
如何做到这一点?
提前致谢!
佐利
编辑:我想要实现的目标
我在 mainViewController 上
通过navcontroller.presentViewController
,我展示了welcomeScreenViewController1
然后我想从 welcomeScreenViewController1
移动到 welcomeScreenViewController2
,而不必先关闭 welcomeScreenViewController1
。最好的是,在该模态视图中,我可以将 welcomeScreenViewController2
推送到 welcomeScreenViewController1
上。
希望有帮助
最佳答案
您的模态屏幕需要是导航 Controller 。所以你需要做:
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:welcomeScreenViewController1];
navController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentViewController:navController animated:YES completion:nil];
然后,您应该能够在导航 Controller 中推送您的welcomeViewController2。
关于iOS 6 在模态呈现的 View Controller 中推送 View Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17109570/