<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSLayoutManager/showAttachmentCell(_:in:characterIndex:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSLayoutManager(im)showAttachmentCell:inRect:characterIndex:"
  },
  "title" : "showAttachmentCell(_:in:characterIndex:)"
}
-->

# showAttachmentCell(_:in:characterIndex:)

Draws an attachment cell.

```
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

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

---

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)