Instance Method インスタンスメソッド

RTFFromRange:documentAttributes:

Returns a data object that contains an RTF stream corresponding to the characters and attributes within the specified range, omitting all attachment attributes. 指定された範囲内の文字および属性それらに一致するRTFストリームを含んでいるデータオブジェクトを返します、すべての添付書類属性を省きます。

Declaration 宣言

- (NSData *)RTFFromRange:(NSRange)range 
      documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> *)dict;

Parameters パラメータ

aRange

The range. その範囲。

docAttributes

A required dictionary specifying the document attributes. The dictionary contains values from Document Types and must at least contain NSDocumentTypeDocumentAttribute. 書類属性を指定している必須辞書。辞書はDocument Typesからの値を含んでいます、そして少なくともNSDocumentTypeDocumentAttributeを含んでいなければなりません。

Return Value 戻り値

A data object containing an RTF stream for the attributed string. 属性付き文字列に対するRTFストリームを含んでいるデータオブジェクト。

Discussion 議論

Writes the document-level attributes in docAttributes, as explained in RTF Files and Attributed Strings. docAttributesの中の書類レベル属性を書いてください、RTF Files and Attributed Stringsで説明されるように。

Raises an NSRangeException if any part of aRange lies beyond the end of the receiver’s characters. NSRangeExceptionを引き起こします、もしaRangeの何らかの部分がレシーバの持つ文字の終わりを越えているならば。

When writing data to the pasteboard, you can use the NSData object as the first argument to the NSPasteboard method setData:forType:, with a second argument of NSRTFPboardType. Although this method strips attachments, it leaves the attachment characters in the text itself. データをペーストボードに書き出す場合、あなたはNSDataオブジェクトをNSPasteboardメソッドのsetData:forType:の最初の引数として、NSRTFPboardTypeの2番目の引数とともに、使用できます。このメソッドは添付書類を剥ぎ取りますが、それは添付書類文字それらをテキスト自体の中にそのまま残します。 The NSText method RTFFromRange:, on the other hand, does strip attachment characters when extracting RTF.

See Also 参照

Generating Data データの生成