<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/NSAttachmentAttributeName",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@NSAttachmentAttributeName"
  },
  "title" : "NSAttachmentAttributeName"
}
-->

# NSAttachmentAttributeName

The attachment for the text.

```
extern NSAttributedStringKey const NSAttachmentAttributeName;
```

## Discussion

The value of this attribute is an [`NSTextAttachment`](/documentation/UIKit/NSTextAttachment) object. The default value of this property is `nil`, indicating no attachment.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)