Instance Method

revertToContentsOfURL:ofType:error:

Overridden to clean up the managed object context and controllers during a revert.

Declaration

- (BOOL)revertToContentsOfURL:(NSURL *)inAbsoluteURL ofType:(NSString *)inTypeName error:(NSError * _Nullable *)outError;

Parameters

inAbsoluteURL

An URL object that specifies the location of the file to which to revert.

inTypeName

The type of the document at inAbsoluteURL.

outError

If the method fails to complete correctly, upon return contains an NSError object that describes the problem.

Return Value

YES if the method completes correctly, otherwise NO.

Discussion

See Also

Document Content Management

- readFromURL:ofType:error:

Sets the contents of the receiver by reading from a file of a given type located by a given URL.

- writeToURL:ofType:forSaveOperation:originalContentsURL:error:

Saves changes in the document’s managed object context and saves the document’s persistent store to a given URL.