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
- (instancetype)initWithRTF:(NSData *)data documentAttributes:(NSDictionary<NSAttributed String Document Attribute Key, id> * _Nullable *)dict;
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.