---
title: textAttachment
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/nstextattachmentviewprovider/textattachment
---

# textAttachment

The text attachment for this view.

## Declaration

```swift
weak var textAttachment: NSTextAttachment? { get }
```

## Discussion

Discussion Specify the value of this property at initialization time using the init(textAttachment:parentView:textLayoutManager:location:) initializer.

## See Also

### Defining the contents

- [location](uikit/nstextattachmentviewprovider/location.md)
- [textLayoutManager](uikit/nstextattachmentviewprovider/textlayoutmanager.md)
- [tracksTextAttachmentViewBounds](uikit/nstextattachmentviewprovider/trackstextattachmentviewbounds.md)
- [view](uikit/nstextattachmentviewprovider/view.md)
