Lets say I have 2 classes.
1) class ViewControllerA: UIViewController
2) class ViewControllerB: UIViewController
In addition, I have 2 scenes in my Main.storyboard
file
1) scene that has a green background attached to ViewControllerA
with 1 button
2) scene that has a blue background attached to ViewControllerB
Is there a difference between me instantiating B
let newScene = ViewControllerB()
self.present(newScene, animated: true, completion: nil)
as opposed to using a storyboard helper method
let storyBoard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let newScene = storyBoard.instantiateViewController(withIdentifier: "ViewControllerB") as! ViewControllerB
self.present(newScene, animated: true, completion: nil)
If there is a difference, why are they different?