init(attachment:attributes:)
Creates an attributed string with an attachment and applies the specified attributes to it.
Declaration
convenience init(attachment: NSTextAttachment, attributes: [NSAttributedString.Key : Any] = [:])Parameters
- attachment:
The attrachment to place in the string.
- attributes:
The attributes to apply to the attachment. Specify an empty dictionary to create the string without any extra attributes.
Return Value
An attributed string containing the attachment.