Join Todd Perkins for an in-depth discussion in this video Controlling transitions between views, part of Building a Note-Taking App for iOS 8.
- Now that our data model is set up and connected…to our user interface, what we want to do…is start enabling us to write our own notes.…Now to do that, the functionality that we want is to tap…the plus button in our app, have a note be created…and be taken into an empty note with the keyboard up.…So we'll start in MasterViewController.swift…and look for the insertNewObject method.…
So in here we want to force a transition to the detail view.…So at the bottom of this method I'm going…to call self.performSegueWithIdentifier.…Now the identifier is a string that is connected…to another screen in your storyboard.…Now if you look at the prepareForSegue method,…you can see that there's already a built-in…identifier called showDetail,…which refers to our detail view.…So if we pass in that string here, then we can…automatically transition to the detail view.…
The sender is going to be self and I'll set the sender…as self and close out the parentheses.…And now we scroll down to prepareForSegue.…Now in here what we want to do is make sure…
Each of these courses helps you build a complete mobile app from scratch; this installment uses the iOS SDK and Xcode to get the job done. Author Todd Perkins shows you how to create an Xcode project, lay out apps visually, connect UI elements to code, and save data to persistent storage. Start here with iOS 8, and compare your results with the Android and Windows Phone courses to learn about the differences and similarities of these mobile platforms.
- Previewing the note-taking app's features
- Creating the Xcode project
- Using local data storage
- Creating a data class
- Saving data to a file or user defaults
- Understanding screens and storyboards
- Controlling transitions between views
- Connecting the controller to the data
- Creating, editing, and deleting notes