---
title: NSTextAttachmentContainer
framework: uikit
role: symbol
role_heading: Protocol
path: uikit/nstextattachmentcontainer
---

# NSTextAttachmentContainer

A set of methods that defines the interface to text attachment objects from a layout manager.

## Declaration

```swift
protocol NSTextAttachmentContainer : NSObjectProtocol
```

## Topics

### Getting the bounds

- [attachmentBounds(for:proposedLineFragment:glyphPosition:characterIndex:)](uikit/nstextattachmentcontainer/attachmentbounds(for:proposedlinefragment:glyphposition:characterindex:).md)

### Getting the image

- [image(forBounds:textContainer:characterIndex:)](uikit/nstextattachmentcontainer/image(forbounds:textcontainer:characterindex:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

### Conforming Types

- [NSTextAttachment](uikit/nstextattachment.md)

## See Also

### Attachments

- [NSTextAttachment](uikit/nstextattachment.md)
- [NSTextAttachmentViewProvider](uikit/nstextattachmentviewprovider.md)
- [NSAdaptiveImageGlyph](uikit/nsadaptiveimageglyph.md)
- [NSTextAttachmentLayout](uikit/nstextattachmentlayout.md)
