iPhone从全屏UINavigationView切换到UITabView
新手问题,但我找不到答案。
第一次运行时,我的应用程序是导航视图,引导用户完成设置。 完成此操作后,我将存储数据。
我在我的代表团中首先这样做: self.window.rootViewController = self.navigationController;
在我的代表团启动时,如果设置了数据,我会对选项卡视图执行以下操作。 [self.window addSubview:tabRootController.view];
我的 mainwindow.xib 有两种视图。
一切都很好(不知道我所做的是否是最好的方法,但它正在起作用)。
无论如何,我的问题是当我到达导航视图的末尾并且他们点击保存时,我如何摆脱导航视图并调出选项卡视图?
我看不出有什么方法可以让我的委托添加子视图,并且子视图在我所在的屏幕中不存在 - 所以我很困惑。
Newbie question but I can't find the answer.
On first run my app is navigation view to walk the user through setup.
When this is done and I am storing the data.
I start this in my delegation by doing :
self.window.rootViewController = self.navigationController;
In my delegation at startup if the data is set I do the following for a tabview.
[self.window addSubview:tabRootController.view];
My mainwindow.xib has both views.
All is good (don't know if what I have done is the best way , but it is working).
Anyway my problem is when I get to the end of navigation view and they hit the save , how do I get rid of the navigation view and bring up the tab view ?
I can't see a way I can get my delegate to add the subview, and the subview does not exist in the screen I am in - so I am stumped.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将
presentModalViewController:animated:
及其 NavigationController 进行设置。这样做的优点是,两者都是视图控制器,彼此完全独立,如果您稍后需要再次显示设置,则可以通过一次调用从应用程序中的任何位置呈现模式视图控制器。
It might be easier to have:
presentModalViewController:animated:
for the setup with its NavigationController.This has the advantage that both are view controller are completely independent from each other, and if you later need to show the setup again, you can present the modal view controller from anywhere in your app with a single call.