[英]UISplitViewController: Show masterViewController after navigation in detailViewController on iPhone
I am just playing around with the new functionalities of UISplitViewController in iOS8. 我只是在玩iOS8中UISplitViewController的新功能。 Now I am looking for a solution for the following problem.
现在,我正在寻找以下问题的解决方案。 In my case I want to show some kind of main menu inside the masterViewController.
就我而言,我想在masterViewController中显示某种主菜单。 If you choose an entry in the menu the content in the detailViewController changes.
如果您在菜单中选择一个条目,则detailViewController中的内容将更改。 Now you could navigate inside the detail area changes.
现在,您可以在详细区域更改内导航。 And here is my problem:
这是我的问题:
On iPads the splitViewController behaves like this: You could navigate through any number of viewControllers in the detail area. 在iPad上,splitViewController的行为如下:您可以在详细信息区域中浏览任意数量的viewController。 But you could still swipe in the masterViewController that contains the main menu.
但是您仍然可以在包含主菜单的masterViewController中滑动。
But on iPhone the masterViewController is just the rootViewController of a navigationController. 但是在iPhone上,masterViewController只是navigationController的rootViewController。 So when you are in the n-th level inside the detail area, you have to navigate back through all previous viewControllers to reach the main menu again.
因此,当您位于详细信息区域的第n级时,您必须向后浏览所有以前的viewControllers才能再次进入主菜单。
Do you know any solution to access the main menu from any viewController in the detail areas navigation stack? 您是否知道从详细区域导航堆栈中的任何viewController访问主菜单的解决方案?
Best regards, SlimShady 最好的问候,SlimShady
您可以使用导航栏上的按钮或其他任何地方来触发“撤消搜索”,然后直接跳到菜单视图控制器,这在这个出色的答案中作了详细介绍- “撤消搜索”是做什么用的,以及如何使用它们?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.