I have added a NavigationController in the StoryBoard and made it the initial viewController. How do I get access to the NavigationController in the appDelegate. Ctrl-drag from navigationController to AppDelegate does not create an outlet.
Go to the Project Navigator → info. plist file → Application Scene Manifest property → Scene Configuration → item 0 and get rid of the property Storyboard Name by clicking the icon that has a minus in the circle next to it.
In didFinishLaunchingWithOptions
:
let navigationController = application.windows[0].rootViewController as! UINavigationController
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With