[英]jonkyking/SlideMenu 'attempt to push a View Controller ..its navigationController == nil'
Swift 4 斯威夫特4
I'm using the fantastic resource jonkyking/SlideMenu , but I need a little help implementing it. 我正在使用很棒的资源jonkyking / SlideMenu ,但是我需要一些帮助来实现它。 SlideMenu comes up fine in my MapViewController.
SlideMenu在我的MapViewController中显示良好。 If user clicks on a UIButton in the TableViewController (of SlideMenu) they are supposed to segue to LocationViewDetailController.
如果用户单击(SlideMenu)的TableViewController中的UIButton,则应该将其锁定到LocationViewDetailController。 But I get ..
但我得到..
SideMenu Warning: attempt to push a View Controller from Optional() where its navigationController == nil.
SideMenu警告:尝试从Optional()推入View Controller的导航控制器== nil。 It must be embedded in a Navigation Controller for this to work.
它必须嵌入在导航控制器中才能起作用。
I'm confused since I assume making use of SlideMenu would mean that MapViewController would not be embedded in a Navigation controller since SlideMenu is a NavigationViewController + TableViewController. 我很困惑,因为我假设使用SlideMenu意味着MapViewController不会被嵌入到Navigation控制器中,因为SlideMenu是NavigationViewController + TableViewController。
You can see my git repo here 你可以在这里看到我的git仓库
Perhaps this is question #2, I'm wondering how to have this SlideMenu follow to other view controllers (such as LocationViewController above). 也许这是问题2,我想知道如何让此SlideMenu跟随其他视图控制器(例如上面的LocationViewController)。 If you have successfully implemented SlideMenu, please tell me how to keep the same menu and get it on other view controllers, the SlideMenu demo app is not helping me .
如果您已经成功实现了SlideMenu,请告诉我如何保留相同的菜单并在其他视图控制器上获取它,SlideMenu演示应用程序无济于事 。 Do you have a repo I can look at or a tutorial?
您有我可以查看的仓库或教程吗? Thanks
谢谢
After checking the issues pane on the library you use on gitHub, I saw that there are couple other people having similar issues and they've posted their solution for it. 检查了您在gitHub上使用的库的问题窗格后,我发现还有其他几个人遇到了类似的问题,他们已经发布了解决方案。 They basically embedded the
UIViewController
that invoked the side menu into a UINavigationController
. 他们基本上将调用侧面菜单的
UIViewController
嵌入到UINavigationController
。 The issue reported on github is marked closed and it's #255 在github上报告的问题被标记为已关闭,它是#255
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.