Skip to Main Content
More iPhone 3 Development: Tackling iPhone SDK 3
book

More iPhone 3 Development: Tackling iPhone SDK 3

by Dave Mark, Jeff LaMarche
January 2010
Beginner to intermediate content levelBeginner to intermediate
576 pages
14h 57m
English
Apress
Content preview from More iPhone 3 Development: Tackling iPhone SDK 3

Chapter 6. Custom Managed Objects

At the moment, our Hero entity is represented by instances of the class NSManagedObject. Thanks to key value coding, we have the ability to create entire data models without ever having to create a class specifically designed just to hold our application's data.

There are some drawbacks to this approach, however. For one thing, when using key value coding with managed objects, we use NSString constants to represent our attributes in code, but these constants are not checked in any way by the compiler. If we mistype the name of an attribute, the compiler won't catch it. It can also be a little tedious, having to use valueForKey: and setValue:forKey: all over the place instead of just using properties and dot notation. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Sams Teach Yourself iOS 6 Application Development in 24 Hours, Fourth Edition

Sams Teach Yourself iOS 6 Application Development in 24 Hours, Fourth Edition

John Ray
Migrating to Swift from Flash and ActionScript

Migrating to Swift from Flash and ActionScript

Radoslava Leseva Adams, Hristo Lesev

Publisher Resources

ISBN: 9781430225058Purchase book