Closed caraldel closed 8 years ago
I had the same problem, and I found it was because the navigation controller wasn't the starting point. I had a login view, that was not supposed to be passed through without authentication.
This is what I did to get around the issue:
I know my method may not be the best solution for you, but it works, and works really well.
Let me know if you found any more on that.
Sep
Hi, @SCLDev , just wanted to thank you for your solution. I was stuck for hours...
@mattiaskronberg I'm glad you could use it.
I am really stuck that library too. No actual documentation in github page. Demo application also confusing and i got same error "SlideNavigationController has not been initialized. Either place one in your storyboard or initialize one in code" even my first stack starting with Navigation Controller.
@onderozcan the recommended use of SlideNavigationController is to be set as the rootViewController (as the demo does), you are seeing this error if you try to access the singleton instance before initializing the slideNavigationController.
You still have the option of not setting it as root, but then you are responsible to make sure that you are trying to access it after it gets initialized.
The reason for a bit unusual use of singleton pattern is to support initializing the slideMenu through storyboard.
I'm trying to create a left slide menu with your approach. My entry point in the StoryBoard isn't the SlideNavigationController and when I load the view with is root view of the SlideNavigationController, there is a message in the console: "SlideNavigationController has not been initialized. Either place one in your storyboard or initialize one in code" and the left bar button doesn't appear and when I slide the view, the left menu is 'black'. Do you know why ?
Thanks.