Skip to content
This repository has been archived by the owner on Sep 9, 2019. It is now read-only.

Fails to work unless it is initial view controller #12

Closed
eshork opened this issue Nov 5, 2015 · 7 comments
Closed

Fails to work unless it is initial view controller #12

eshork opened this issue Nov 5, 2015 · 7 comments

Comments

@eshork
Copy link

eshork commented Nov 5, 2015

Tried using this library in a project where this nav controller takes over after a segue from another UIViewController. The menu still slides down as expected, but none of the menu items are clickable.

@pixyzehn
Copy link
Owner

pixyzehn commented Nov 5, 2015

@Zeroskill
See version 1.1.3
You can set the enabled as a property.
If you don't want to use menu any more, you are able to turn the menu off.

@eshork
Copy link
Author

eshork commented Nov 10, 2015

Still doesn't fix the issue, but I'm thinking this is more of a rootViewController/navigation-stack issue.

@eshork eshork closed this as completed Nov 10, 2015
@pixyzehn
Copy link
Owner

I see. Thanks for letting me know.

@trujamal
Copy link

Was this issue ever fixed?

@dilizarov
Copy link

+1. This only works if it is on the initial view controller, but if you have a login view controller or something that segues into a UINavigationController with this, then it breaks. Otherwise, its a pretty nice library.

@oenama
Copy link

oenama commented Apr 1, 2017

so this could never be fixed ?

@MaeseppTarvo
Copy link

MaeseppTarvo commented Apr 1, 2017

I checked it out also and it seems that the problem is that if you "logout" and set your initial viewcontroller to your welcome view and "log in" again. It keeps the previous menu underneath. If you "Log back in" then even the selected index is the last one.

I am using this to instantiate(log out) the "WelcomeViewController" and I think that is the problem.

let storyboard = UIStoryboard(name: "Landing", bundle: nil)
        
 let controller = storyboard.instantiateViewController(withIdentifier: "WelcomeViewController")
        
        
 let appDelegate = UIApplication.shared.delegate as! AppDelegate
        
 appDelegate.window?.rootViewController = controller

And that is how I "log in":

let storyboard = UIStoryboard(name: "Main", bundle: nil)
                    
let controller = storyboard.instantiateViewController(withIdentifier: "NavigationController")

let appDelegate = UIApplication.shared.delegate as! AppDelegate
                    
 self.dismiss(animated: false, completion: { 
           appDelegate.window?.rootViewController = controller
 })

You can check out the following images:

  1. This is in normal phase

normal1

  1. This is after logout and back login

bad

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants