Reputation: 25934
How/when can a UIViewController return self.storyboard
nil.
I am trying to instantiate a ViewController with:
self.storyboard!.instantiateViewControllerWithIdentifier
But self.storyboard is nil?
Note: the plist is set to the right storyboard.
Upvotes: 0
Views: 423
Reputation: 62052
Per the Apple documentation, UIViewController
's storyboard
property represents the storyboard from which the view controller originated. It returns an optional UIStoryboard
instance which is nil
if the view controller was not instantiated from a storyboard.
Upvotes: 1
Reputation: 25934
Try this :
let localStoryboard = UIStoryboard(name: "Main", bundle: nil)
Upvotes: 0