Skip to content

Navigating to a ViewController from AppDelegate #152

@sskiathitis

Description

@sskiathitis

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)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions