简体   繁体   English

jonkyking / SlideMenu'尝试推送视图控制器..its navigationController == nil'

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

相关问题 SideMenu 警告:尝试在 swift 中从它的 navigationController == nil 的位置推送一个视图控制器 - SideMenu Warning: attempt to push a View Controller from where its navigationController == nil in swift 当按下viewcontroller时,navigationController为nil - navigationController is nil,when push the viewcontroller 为什么我不能在NavigationController中推送视图控制器? - Why i can not push a view controller in my navigationController? 应用程序试图在目标上推送一个nil视图控制器 - Application tried to push a nil view controller on target 应用程序尝试将nil视图控制器推入目标 - Application tried to push a nil view controller on target 在已部署的应用程序上推送零视图 controller - Push a nil view controller on deployed app 无法推送 viewController,因为 navigationController 为零 - Can't push viewController because navigationController is nil 导航控制器模拟推送的更新视图 - Update view of a NavigationController simulating a push 在 NavigationController 中跳过登录视图控制器 - Skip Login View Controller in the NavigationController 应用程序尝试将目标推送到nil视图控制器<UINavigationController> - Application tried to push to a nil view controller on target <UINavigationController>
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM