<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCell/draw(withExpansionFrame:in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCell(im)drawWithExpansionFrame:inView:"
  },
  "title" : "draw(withExpansionFrame:in:)"
}
-->

# draw(withExpansionFrame:in:)

Instructs the receiver to draw in an expansion frame.

```
func draw(withExpansionFrame cellFrame: NSRect, in view: NSView)
```

## Parameters

`cellFrame`

The frame in which to draw.

`view`

The view in which to draw. This view may be different from the original view that the cell appeared in.

## Discussion

This method allows the cell to perform custom expansion tool tip drawing. By default, `NSCell` simply calls [`draw(withFrame:in:)`](/documentation/AppKit/NSCell/draw(withFrame:in:)).

---

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)