Reputation: 19
I am trying to switch from one controller to another. But the error shows undeclared type.
I have import UIKit
on the controller but that also didn't work.
let storyboard = UIStoryboard(name: "ParticularUserInfo", bundle: nil)
let viewController = storyboard.instantiateViewController(withIdentifier: "AssignedScorerViewController") as! AssignedScorerViewController
viewController.USERID = USERID
self.present(viewController, animated: true, completion: nil)
Upvotes: 2
Views: 143
Reputation: 5271
Please verify that your Storyboard
name is "ParticularUserInfo"? Probably it could be "Main". Also verify that in your storyboard for that particular ViewController
identifier is set as "AssignedScorerViewController".
to set Identifier, select your ViewController
in storyboard and set Storyboard ID
, according to my attached screenshot.
Upvotes: 1