Search code examples
iosswiftslide

jonkyking/SlideMenu 'attempt to push a View Controller ..its navigationController == nil'


Swift 4

I'm using the fantastic resource jonkyking/SlideMenu, but I need a little help implementing it. SlideMenu comes up fine in my MapViewController. If user clicks on a UIButton in the TableViewController (of SlideMenu) they are supposed to segue to LocationViewDetailController. But I get ..

SideMenu Warning: attempt to push a View Controller from Optional() where its navigationController == 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.

You can see my git repo here

Perhaps this is question #2, I'm wondering how to have this SlideMenu follow to other view controllers (such as LocationViewController above). 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 . Do you have a repo I can look at or a tutorial? Thanks


Solution

  • 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. They basically embedded the UIViewController that invoked the side menu into a UINavigationController. The issue reported on github is marked closed and it's #255