NSManagedObjectContext
class NSManagedObjectContext : NSObject, NSCoding, NSLocking
-
Describes a child managed object context.
Declaration
Swift
public typealias ChildContext = NSManagedObjectContext
-
Attempts to commit unsaved changes to registered objects in the context. This function is performed in a block on the context’s queue. If the context has no changes, then this function returns immediately and the completion block is not called.
Declaration
Swift
public func save(wait: Bool = true, completion: ((SaveResult) -> Void)? = nil)
Parameters
wait
If
true
(the default), saves synchronously. Iffalse
, saves asynchronously.completion
The closure to be executed when the save operation completes.