You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I will Explain my Problem alittle bit. So i am not initialising drawerview in Appdelegate. instead i am initialising the drawer view in my loginView Controller and Setting the rootViewController From there. Everything is Working fine. But when i go to the other ViewControllers and comeback to the drawer screen through a segue it won't work from here. I tried to reiniallize the drawerview and set the rootController again. but it also didn't work. i will attach my code
App Delegate File Code.
var window: UIWindow?
var drawerController = KYDrawerController.init(drawerDirection: .left, drawerWidth: 300)
Login Screen Code. Where i am Iniallizing the drawer view
let appDel = UIApplication.shared.delegate as! AppDelegate
let mainVc = self.storyboard?.instantiateViewController(withIdentifier: "Tabs")
let drawerVc = self.storyboard?.instantiateViewController(withIdentifier: "Drawer")
let tabbarController = mainVc as? UITabBarController
let nextScene = tabbarController?.viewControllers![0] as! MapViewTabViewController
nextScene.loginResponse = self.loginResponseglobal
let nextListScene = tabbarController?.viewControllers![1] as!
ListViewDashboardViewController
appDel.drawerController.mainViewController = mainVc
appDel.drawerController.drawerViewController = drawerVc
appDel.window?.rootViewController = appDel.drawerController
appDel.window?.makeKeyAndVisible()
For the First time it was working. but unfortunatly it is not working when i come from another screen. except LoginScreen. AnyHelp would be appreciated. as i am started in ios.
The text was updated successfully, but these errors were encountered:
I used this and it worked:
let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
let nextViewController = storyBoard.instantiateViewController(withIdentifier: "kyDrawerController") as! KYDrawerController
self.present(nextViewController, animated:true, completion:nil)
I will Explain my Problem alittle bit. So i am not initialising drawerview in Appdelegate. instead i am initialising the drawer view in my loginView Controller and Setting the rootViewController From there. Everything is Working fine. But when i go to the other ViewControllers and comeback to the drawer screen through a segue it won't work from here. I tried to reiniallize the drawerview and set the rootController again. but it also didn't work. i will attach my code
App Delegate File Code.
Login Screen Code. Where i am Iniallizing the drawer view
For the First time it was working. but unfortunatly it is not working when i come from another screen. except LoginScreen. AnyHelp would be appreciated. as i am started in ios.
The text was updated successfully, but these errors were encountered: