Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigating to a ViewController from AppDelegate #152

Open
sskiathitis opened this issue Oct 19, 2020 · 0 comments
Open

Navigating to a ViewController from AppDelegate #152

sskiathitis opened this issue Oct 19, 2020 · 0 comments

Comments

@sskiathitis
Copy link

How can I navigate from AppDelegate to a ViewController keeping the NavigationBar? I tried the following with no luck.

Firstly I instanciated the target ViewController:

let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: "VC") as? ActionViewController

let ky = self.window?.rootViewController as! KYDrawerController
if let k = ky.mainViewController as? UINavigationController
{
k.pushViewController(vc!, animated: true)
}

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

No branches or pull requests

1 participant