[英]Jump from a TableViewCell to a ViewController embedded in a NavigationController
I am a newbie in iOS development and I am creating an application that has a sidebar, and from this sidebar the user can select a View to jump to. 我是iOS开发的新手,正在创建一个具有侧边栏的应用程序,用户可以从侧边栏中选择要跳转到的视图。 The views that are offered are part of a navigation controller.
提供的视图是导航控制器的一部分。 The NavigationController is the front of a revealViewController, so the sidebar will appear in every window linked to the NavigationController.
NavigationController是reveveViewController的前面,因此侧栏将出现在链接到NavigationController的每个窗口中。
Bellow you can see my storyboard. 在下面您可以看到我的情节提要。
The problem is, if I click the Map("Mapa") item from the menu(sidebar) I will have to move to the second View from the navigationController.
问题是,如果我从菜单(侧栏)单击Map(“ Mapa”)项,则必须从navigationController移至第二个View。 If I use a regular segue the navigation properties will disappear.
如果我使用常规搜索,导航属性将消失。 Is there a way to move to any of the views and maintain the navigation hierarchy?
是否可以移动到任何视图并维护导航层次结构?
Thanks in advance, 提前致谢,
Caio Guedes Caio Guedes
If I understand you correctly you want to have a sidebar in every view and just switch between them. 如果我对您的理解正确,则希望在每个视图中都有一个侧边栏,并在它们之间进行切换。 Since you want the views to be separate I would consider using Tab Bar because it is the default option in iOS to navigate between different views and is recommended by Apple.
因为您希望视图是分开的,所以我考虑使用“标签栏”,因为它是iOS中在不同视图之间导航的默认选项,并且由Apple建议。 But if you want to use sidebar anyways I would recommend using different navigation controller for each view controller.
但是,如果仍然要使用侧边栏,我建议为每个视图控制器使用不同的导航控制器。 Using one navigation controller would cause too much trouble.
使用一个导航控制器会造成太多麻烦。 Check out this tutorial that I managed to find.
查看我设法找到的本教程。 http://www.appcoda.com/sidebar-menu-swift/ Hope I could help just a little and sorry if I mislead you in any way, I'm a newbie as well!
http://www.appcoda.com/sidebar-menu-swift/希望我能有所帮助,如果以任何方式误导您,对不起,我也是新手!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.