I\'ve looked through all the class documentation for Core Data and I can\'t find away to programmatically update values in a core data entity. For example, I have a structur
Sounds like you're thinking in terms of an underlying relational database. Core Data's API is built around model objects, not relational databases.
An entity is a Cocoa object—an instance of NSManagedObject
or some subclass of that. The entity's attributes are properties of the object. You use key-value coding or, if you implement a subclass, dot syntax or accessor methods to set those properties.
Evan DiBiase's answer shows one correct way to set the property—specifically, an accessor message. Here's dot syntax:
bookTwo.title = @"BarBar";
And KVC (which you can use with plain old NSManagedObject
):
[bookTwo setValue:@"BarBar" forKey:@"title"];