Type Method

attributedStringWithAttachment:

Creates an attributed string with an attachment.

Declaration

+ (NSAttributedString *)attributedStringWithAttachment:(NSTextAttachment *)attachment;

Parameters

attachment

The attachment.

Return Value

An attributed string containing the attachment.

Discussion

This is a convenience method for creating an attributed string containing an attachment using NSAttachmentCharacter as the base character.

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.

- initWithDocFormat:documentAttributes:

Initializes and returns a new NSAttributedString object from Microsoft Word format data contained in the given NSData 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.