- Setup the view controller code, and set it as the view controller class against a view controller in your storyboard
- Set the storyboard id, this is how you will load the view from your storyboard
- Use the following code to change views (code styling is due to lack of space):
... let vc = self.storyboard! .instantiateViewControllerWithIdentifier ("SpellingListsViewController") as! SpellingListsViewController self.presentViewController(vc, animated: true, completion: nil) ...
Thursday, 10 December 2015
Swift - Switching Views Programmatically
Sometimes you may want to do custom navigation, in this case you will want to know how to switch views programmatically. To do this you need to follow the following steps:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment