I programatically have multiple View Controllers in an iOS Swift Project. I do not have the storyboards and would like to avoid them if possible. Is there a way to switch to
Just use this : Make sure using nibName otherwise preloaded views of xib will not show :
var vc : ViewController = ViewController(nibName: "ViewController", bundle: nil) //change this to your class name
var vc : ViewController = ViewController(nibName: "ViewController", bundle: nil)
self.presentViewController(vc, animated: true, completion: nil)