how to indicate viewcontoller in storyboard in AppDelegate?

Hi,


how to indicate viewcontoller in storyboard in AppDelegate? (it's view is drawn in storyboard)


because 'self.storyboard' can not be used in AppDelegate...


Thanks

Answered by QuinceyMorris in 228732022

The easiest way is to set up the view controller reference in "viewDidLoad". At that point you can, for example, set a property in the AppDelegate.


If you're using one of UIKit's standard view controllers, then you'll need to subclass it to override "viewDidLoad". (Don't forget to replace the class name for the view controller in the storyboard, too.)

Accepted Answer

The easiest way is to set up the view controller reference in "viewDidLoad". At that point you can, for example, set a property in the AppDelegate.


If you're using one of UIKit's standard view controllers, then you'll need to subclass it to override "viewDidLoad". (Don't forget to replace the class name for the view controller in the storyboard, too.)

how to indicate viewcontoller in storyboard in AppDelegate?
 
 
Q