Reputation: 701
I can't figure out why it's crashing with "this class is not key value coding-compliant for the key profilePic" in this picture.
Upvotes: 0
Views: 1566
Reputation: 114875
With storyboard scenes, the view controller instance class is set by the custom class assigned to the view controller scene. With NIB files you are responsible for initialising the correct class instance yourself:
Rather than
let initialViewController = UIViewController.init(nibName: "InitialViewController", bundle: nil) as! InitialViewController
You need to have
let initialViewController = InitialViewController(nibName:"InitialViewController". bundle: nil)
Upvotes: 2