---
title: attachment
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsattributedstring/key/attachment
---

# attachment

The attachment for the text.

## Declaration

```swift
static let attachment: NSAttributedString.Key
```

## Discussion

Discussion The value of this attribute is an NSTextAttachment object. The default value of this property is nil, indicating no attachment.

## See Also

### Getting attachment attribute keys

- [adaptiveImageGlyph](foundation/nsattributedstring/key/adaptiveimageglyph.md)
