Instance Method

writeToURL:error:

Saves the color list to the file at the specified URL.

Declaration

- (BOOL)writeToURL:(NSURL *)url error:(NSError * _Nullable *)errPtr;

Parameters

url

The URL at which to store the color list. The URL must specify either a directory or file in the file system. Specify nil to save the color list to the user's ~/Library/Colors directory.

errPtr

A pointer to an error object variable, which you use to receive any error information.

Return Value

YES if the method saved the color list successfully or NO if there was an error.

Discussion

If url represents a directory, this method saves the color list in that directory in a file with the name <name>.clr, where <name> is the value of the name property. If url represents a file, this method saves the color list using the name you provided.

See Also

Writing and Removing Color-List Files

- removeFile

Removes the file from which the list was created, if the file is in a standard search path and owned by the user.

- writeToFile:

Saves the color list to the file at the specified path.

Deprecated