<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextAttachment/allowsTextAttachmentView",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextAttachment(py)allowsTextAttachmentView"
  },
  "title" : "allowsTextAttachmentView"
}
-->

# allowsTextAttachmentView

A Boolean value that determines whether the text attachment uses text attachment views.

```
var allowsTextAttachmentView: Bool { get set }
```

## Discussion

When `true`, the text attachment tries to use a text attachment view returned by [`viewProvider(for:location:textContainer:)`](/documentation/AppKit/NSTextAttachmentLayout/viewProvider(for:location:textContainer:)). Default is `true`.

---

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)