UISplitView 作为根视图以外的东西
我想在我的应用程序中使用 UISplitViewController 但不作为我的应用程序的根视图。我希望在使用分割视图(即登录)的屏幕之前还有其他几个屏幕。问题是我能找到的所有示例都将 UISplitViewController 设置为应用程序的根视图,而我似乎无法弄清楚如何将其作为另一个屏幕的控制器。
I want to use the UISplitViewController in my app but not as the root view for my app. i want there to be several other screens before the one that uses the split view (ie login). the problem is that all the examples i can find have the UISplitViewController set as the root view for the app and i just cant seem to figure out how to make it as the controller for another screen.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能想到的几个选项:
1)让预分割视图屏幕位于分割视图的顶部,然后当您完成登录过程时,隐藏它们。
2) 完成登录过程后,创建分割视图并将其设置为主窗口的根视图控制器。根据 UIWindow 文档,如果您在具有现有视图层次结构的窗口上设置 rootViewController 属性,它将删除旧视图并安装新视图。
A couple options I can think of:
1) Have the pre-split view screens be on top of the split view, then when you are done with the login process, hide them.
2) When you are done with the login process, make the split view then and set it as the root view controller of the main window. According to the UIWindow documentation, if you set the rootViewController property on a window with an existing view hierarchy, it removes the old views and installs the new ones.