Converting Entities to Objects
As the template is written, you are working with an NSManagedObject
for the Observation entity. At runtime, all entities become objects of that class or subclasses of it. The template displays the data from the instances that you create with + in the master view controller by looking up their attributes with KVC. Listing 10.1 shows the relevant code.
- (void)configureView{ // Update the user interface for the detail item. if (self.detailItem) { self.detailDescriptionLabel.text = [[self.detailItem valueForKey:@"timeStamp"] description]; }}
When the same data is displayed in the table view in the master view controller, ...
Get Learning iCloud Data Management: A Hands-On Guide to Structuring Data for iOS and OS X now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.