Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 17. Core Data > Adding Objects

Adding Objects

All objects managed by a managed object context are NSManagedObject instances. NSManagedObject is a class that implements the required behavior for a Core Data model object. You do not create NSManagedObject instances, but rather subclasses. These subclasses are usually created from the entities defined in an xcdatamodel file.

The easiest way to create a new managed object is through the NSEntityDescription’s class method, insertNewObjectForEntityForName:inManagedObjectContext.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial