evnaz / ENSwiftSideMenu

A simple side menu for iOS written in Swift.
MIT License
1.82k stars 282 forks source link

Logout screen #181

Open atalayasa opened 6 years ago

atalayasa commented 6 years ago

I have login screen and in the next page EnSwiftSide navigation controller. When I press logout from table view it needs to go back first screen I have tried unwind segue but It did not work properly. How can I go back initial view controller when I press logout? Thanks

frestoinc commented 6 years ago

@atalayasa Assuming that you using a navigation controller for your login screen u can use self.view.window?.rootViewController?.dismiss(animated:true, completion: nil) to return to rootviewcontroller

atalayasa commented 6 years ago

@frestoinc No I am not using my navigation controller for my login screen. There is only login screen at first and then when user login to the system navigation controller is showing.

frestoinc commented 6 years ago

@atalayasa this is my method: i add a navigationcontroller as rootviewcontroller for the login page. This page then can be navigated to a sign up page, forgot page, t&c page. If login successful, then navigate to another navigationcontroller containing the rest of pages. when user logout with the function above it will return to the first navigationcontroller, ie rootviewcontroller and repeat

ShaikBaji1506 commented 6 years ago

Hi, as per the demo I have made SideMenuController as Initial View Controller but the thing is I have Login SignIn SignUp but when I swipe from left to right the side menu is opening this should start when I logged In but from the scratch it is opening please help me Kindly asap how to remove gesture for this case in Login Sign up page bcz our initial view controller is SideMenuNavigationcontroller

frestoinc commented 6 years ago

@ShaikBaji1911 suggest you use kydrawercontroller instead of this library