Instance Method

initWithDocFormat:documentAttributes:

Initializes and returns a new NSAttributedString object from Microsoft Word format data contained in the given NSData object.

Declaration

- (instancetype)initWithDocFormat:(NSData *)data documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> * _Nullable *)dict;

Parameters

data

The data from which to create the string.

docAttributes

An in-out dictionary containing document-level attributes described in Document Attributes. May be NULL, in which case no document attributes are returned.

Return Value

Returns an initialized object, or nil if the data can’t be decoded.

See Also

Creating an NSAttributedString Object

- initWithString:

Returns an NSAttributedString object initialized with the characters of a given string and no attribute information.

- initWithString:attributes:

Returns an NSAttributedString object initialized with a given string and attributes.

- initWithAttributedString:

Returns an NSAttributedString object initialized with the characters and attributes of another given attributed string.

- initWithData:options:documentAttributes:error:

Initializes and returns a new attributed string object from the data contained in the given data object.

- initWithHTML:documentAttributes:

Initializes and returns a new NSAttributedString object from HTML contained in the given data object.

- initWithHTML:baseURL:documentAttributes:

Initializes and returns a new NSAttributedString object from the HTML contained in the given object and base URL.

- initWithHTML:options:documentAttributes:

Initializes and returns a new attributed string object from HTML contained in the given data object.

- initWithRTF:documentAttributes:

Initializes a new attributed string object by decoding the stream of RTF commands and data contained in the given data object.

- initWithRTFD:documentAttributes:

Initializes a new attributed string object by decoding the stream of RTFD commands and data contained in the given data object.

- initWithRTFDFileWrapper:documentAttributes:

Initializes a new attributed string object from the specified file wrapper containing an RTFD document.

- initWithURL:options:documentAttributes:error:

Initializes a new NSAttributedString object from the contents of the given URL.

+ attributedStringWithAttachment:

Creates an attributed string with an attachment.