How to get my navigation controller instance in AppDelegate?

Hi

When push notification is recieved and tapping on the notification opens the app and HomePage is in display.In Notification handling par,t i need to navigate to someother viewController (eg. SampleViewcontroller).SampleViewcontroller has back button.Tapping on back should come to HomePage.

How to get my navigation controller instance in AppDelegate?

Replies

You mean, you want to reference navigationController in AppDelegate ?


If I understand what you want, you could instantiate it :

func instantiateViewController(withIdentifier identifier: String) -> UIViewController


Overview

A storyboard represents the view controllers for all or part of your app’s user interface. Typically, view controllers in a storyboard are instantiated and created automatically in response to actions defined within the storyboard itself. However, you can use a storyboard object to instantiate the initial view controller in a storyboard file or instantiate other view controllers that you want to present programmatically.