Navigate Particular ViewController from appdelegate in NavigationViewController stack


When you are in AppDelegate you want to navigate to the particular view in Navigation stack.You will use the window as rootViewController then navigate to the particular ViewController using the navigation stack.
Code:
                var rootViewController = self.window!.rootViewController as! UINavigationController

                rootViewController.pushViewController(ViewController, animated: true)

Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift