Join Todd Perkins for an in-depth discussion in this video Controlling note display in a table view, part of Building a Note-Taking App for iOS 7.
- View Offline
…In order to get our notes to display properly, we have three tasks.…First, to show the value instead of the key in the list, when you create doves.…Second, to organize notes based on the date that they…were created, so that the newer notes are on the top.…And third, updating the list of notes when you come back from editing a note.…So first we'll scroll down and find the cell for RowAtIndexPath method.…
In my code, that's on line 67.…And here is where we're displaying the item in the table cell.…Which is also the list item.…Now again we want to see the value instead of the key in that field.…So, on line 71, I'm going to change NSDate to NSString.…So now NS string object, remember, that all…of the objects in our object array are strings.…So now I'll change the value on line 72.…
So, in our text field, we want to put, not the key, but the value for the key.…So, to get the value, we need to reference all of our notes.…So, data get all notes.…And then outside, in outer brackets, object for key object.…So now when we create a note, we're going to see the appropriate object for key.…
These courses take you through building 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, and compare and contrast your results with the other courses to learn about the differences and similarities of the 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
- Understanding screens and storyboards
- Creating and editing notes
- Controlling note display in a table view
- Deleting notes