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
You can use code:
if let vc = self.storyboard?.instantiateViewController(withIdentifier: "secondViewController") as? secondViewController { let appDelegate = UIApplication.shared.delegate as! AppDelegate appDelegate.window?.rootViewController = vc }