@IBAction func nextButtonTapped(sender: AnyObject) { var nextView: TheNextViewController = self.storyboard?.instantiateViewControllerWithIdentifier("TheNextViewController") as! TheNextViewController let appdelegate = UIApplication.sharedApplication().delegate as! AppDelegate appdelegate.window!.rootViewController = nextView }
Friday, December 9, 2016
Swift: programmatically switch ViewController
To switch between ViewController in Swift, you can use the following code:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment