Join Todd Perkins for an in-depth discussion in this video Handling deleted notes, part of iOS App Development: Apple iCloud API (2013).
So we have already looked at adding notes and having them transfer to other…devices through iCloud.…But what if you wanted to transfer your deleted notes without having the clunky…system of just using all of iCloud's data and dumping it on all of your notes?…So let's go to Constants and look at how to do that by adding a new constant…value called kDeletedNotes, and the value will be the NSString deletedNotes.…Save and head over to Data.m.…
And now scroll up to the top where allNotes is instantiated.…What we're going to do here is we are going to create another static property,…and we will call it deletedNotes and we are going to save this to…NSUserDefaults and the cloud, so that way when a note is deleted we can check…against the cloud's deleted notes and see what needs to be deleted from our local data source.…So where it says static NSMutableDictionary allNotes, separate comma and add a new…one, and we'll call this deletedNotes, and what we'll do is copy allNotes, and…if allNotes is equal to nil, and change allNotes to deleted notes, and change the…
- Understanding the class structure of an app
- Building the data model and constants
- Making your app compatible with the Apple Developer portal
- Connecting to iCloud
- Understanding the UIDocument class
- Handling document metadata class
- Opening, closing, saving, and deleting documents from iCloud
Skill Level Intermediate
iOS 6 App Development New Featureswith Simon Allardice2h 29m Intermediate
1. Building the Note-Taking App
2. Preparing the App to Use iCloud
3. Working with iCloud Key-Value Pairs
4. Working with iCloud Documents
Next steps2m 41s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.