简体   繁体   English

UISplitViewController:在iPhone上的detailViewController中导航后显示masterViewController

[英]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.

相关问题 在UISplitViewController iOS 8 iPhone中更改MasterViewController宽度不起作用 - Changing MasterViewController width in UISplitViewController iOS 8 iPhone not working 将数据从DetailViewController发送到MasterViewController - sending data from DetailViewController to MasterViewController 无法从MasterViewController识别UISplitViewController选择器 - UISplitViewController selector not recognized from MasterViewController UISplitViewController在不是主设备的iPhone设备上显示详细视图 - UISplitViewController show detail view on iPhone devices not master 在iPhone上使用UISplitViewController时如何实现推送导航? - How to implement push navigation when using UISplitViewController on iPhone? 强制UISplitViewController始终以横向显示主(仅限)(在iPhone 6 Plus上) - Force UISplitViewController to always show master (only) in landscape (on iPhone 6 Plus) iPhone 上的 UISplitViewController:从细节视图控制器弹出/显示主视图 - UISplitViewController on iPhone: pop to / show primary view from detail view controller 当我在UISplitViewController中将iPad转到纵向模式时,调整detailViewController的pagecontrolview的大小 - Resize the pagecontrolview of detailViewController when i turn iPad to Portrait mode in UISplitViewController 如何在地图iPhone上显示导航? - How to show navigation on map iPhone? 如果用户在查看MasterViewController时旋转,则DetailViewController的Master-Detail App自动旋转未对齐 - Master-Detail App Autorotation for DetailViewController not aligned if user rotates while viewing MasterViewController
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM