---
title: "showAttachmentCell(_:in:characterIndex:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nslayoutmanager/showattachmentcell(_:in:characterindex:)"
---

# showAttachmentCell(_:in:characterIndex:)

Draws an attachment cell.

## Declaration

```swift
func showAttachmentCell(_ cell: NSCell, in rect: NSRect, characterIndex attachmentIndex: Int)
```

## Parameters

- `cell`: The attachment cell to draw.
- `rect`: The rectangle within which to draw cell.
- `attachmentIndex`: The location of the attachment cell.

## Discussion

Discussion The attachmentIndex parameter is provided for cells that alter their appearance based on their location.

## See Also

### Managing attachments

- [defaultAttachmentScaling](appkit/nslayoutmanager/defaultattachmentscaling.md)
