---
title: NSTextAttachmentContainer
framework: appkit
role: symbol
role_heading: Protocol
path: appkit/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:)](appkit/nstextattachmentcontainer/attachmentbounds(for:proposedlinefragment:glyphposition:characterindex:).md)

### Getting the image

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

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

### Conforming Types

- [NSTextAttachment](appkit/nstextattachment.md)

## See Also

### Attachments

- [NSTextAttachment](appkit/nstextattachment.md)
- [NSTextAttachmentViewProvider](appkit/nstextattachmentviewprovider.md)
- [NSAdaptiveImageGlyph](appkit/nsadaptiveimageglyph.md)
- [NSTextAttachmentLayout](appkit/nstextattachmentlayout.md)
- [NSTextAttachmentCell](appkit/nstextattachmentcell-swift.class.md)
- [NSTextAttachmentCellProtocol](appkit/nstextattachmentcellprotocol.md)
