---
title: "draw(withFrame:in:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscell/draw(withframe:in:)"
---

# draw(withFrame:in:)

Draws the receiver’s border and then draws the interior of the cell.

## Declaration

```swift
func draw(withFrame cellFrame: NSRect, in controlView: NSView)
```

## Parameters

- `cellFrame`: The bounding rectangle of the receiver.
- `controlView`: The control that manages the cell.

## Discussion

Discussion This method draws the cell in the currently focused view, which can be different from the controlView passed in. Taking advantage of this behavior is not recommended, however.

## See Also

### Drawing and Highlighting

- [highlightColor(withFrame:in:)](appkit/nscell/highlightcolor(withframe:in:).md)
- [drawInterior(withFrame:in:)](appkit/nscell/drawinterior(withframe:in:).md)
- [controlView](appkit/nscell/controlview.md)
- [highlight(_:withFrame:in:)](appkit/nscell/highlight(_:withframe:in:).md)
- [isHighlighted](appkit/nscell/ishighlighted.md)
