Instance Method

readFromURL:options:documentAttributes:

Sets the contents of receiver from the file at url.

Declaration

- (BOOL)readFromURL:(NSURL *)url options:(NSDictionary *)options documentAttributes:(NSDictionary * _Nullable *)dict;

Parameters

url

The URL of the document to open.

options

The option keys for importing the document. For a list of possible values, see “Option keys for importing documents” in NSAttributedString.

documentAttributes

On return, contains the document attributes. For a list of possible values, see “Document Attributes” in NSAttributedString.

Return Value

YES if the attributed string is created successfully or NO if it was not.

Discussion

Filter services can be used to convert the contents of the URL into a format recognized by Cocoa.

See Also

Deprecated

- readFromData:options:documentAttributes:

Sets the contents of the receiver from the stream at data.

Deprecated
- readFromFileURL:options:documentAttributes:error:

Sets the contents of the receiver from the file at the given URL.

Deprecated