Ipad 如何将视图切换到 SplitViewController
这就是我想做的,但不确定是否可以做到。
我的第一个视图包含 3 个按钮。 当显示此视图时,我需要提供一个 ModalPopup 进行登录。 身份验证完成后,用户可以点击 3 个按钮之一。 当按钮被粘贴时,我需要将此视图切换到 TabBarController 并激活与按钮相关的正确 TabBarItem。 大多数 TabBarItems 都可以包含 SplitViewController。
我阅读了几篇有关 SplitViewController 的文章和教程,但其中大多数都展示了如何从 appDelegate 控制器运行 splitViewController。
那么我的第一个问题是..这可能吗:-) 第二个是,如何?
谢谢...
This is what I want to do but not sure if it could be done.
my first view contains 3 buttons.
When this view is displayed, I need to present a ModalPopup for the login.
When the authenfication is done, the user can tap on one of the 3 buttons.
When the button is taped, I need to switch this view to a TabBarController and active the correct TabBarItem regarding the button.
Most of the TabBarItems can contain a SplitViewController.
I read several posts and tutorial about the SplitViewController but most of them show how to run a splitViewController from the appDelegate controller.
Then my first question would be.. is it possible :-)
The second one, would be, how?
Thanks...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Mortoc 关于 UISplitViewController 需要成为根控制器的说法是正确的。
您可以使用 MGSplitViewController 作为 UISplitViewController 的直接替代品 - 并且它没有这个限制。
听起来你的层次结构可能是这样的
Mortoc is correct about UISplitViewController needing to be the root controller.
You can use MGSplitViewController as a drop-in replacement for UISplitViewController - and it doesn't have this limitation.
It sounds as if your hierarchy might be something like
抱歉,您必须推出自己的 SplitViewController 等效项。 Apple 仅支持 UISplitViewController 作为根视图项:它必须是应用程序中加载的第一个视图,并且其大小是固定的。
http://developer.apple.com/library/ios/ #featuredarticles/ViewControllerPGforiPhoneOS/iPadControllers/iPadControllers.html
Sorry, you'll have to roll your own SplitViewController equivalent. Apple only supports UISplitViewController as the root view item: it has to be the first view loaded in your application and it's size is fixed.
http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/iPadControllers/iPadControllers.html