---
title: "drawBackground(in:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstablerowview/drawbackground(in:)"
---

# drawBackground(in:)

Draws the background of the row in the rectangle.

## Declaration

```swift
func drawBackground(in dirtyRect: NSRect)
```

## Parameters

- `dirtyRect`: The rectangle that requires drawing.

## Discussion

Discussion Overriding this method allows an application to draw a custom background for a table row view. By default, this method draws the background color or group row style as appropriate for the row. This method also draws the “below look” for a drop target if isTargetForDropOperation is true.

## See Also

### Overriding Row View Display Characteristics

- [backgroundColor](appkit/nstablerowview/backgroundcolor.md)
- [drawDraggingDestinationFeedback(in:)](appkit/nstablerowview/drawdraggingdestinationfeedback(in:).md)
- [drawSelection(in:)](appkit/nstablerowview/drawselection(in:).md)
- [drawSeparator(in:)](appkit/nstablerowview/drawseparator(in:).md)
