Initializes a new attributed string object by decoding the stream of RTF commands and data contained in the given data object.
SDK
- macOS 10.0+
Framework
- App
Kit
Declaration
init?(rtf data: Data, documentAttributes dict: Autoreleasing Unsafe Mutable Pointer<NSDictionary?>?)
Parameters
rtfData
The data containing RTF content.
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.
Discussion
Also returns by reference in doc
a dictionary containing document-level attributes described in Document Attributes. doc
may be NULL
, in which case no document attributes are returned. Returns an initialized object, or nil
if rtf
can’t be decoded.