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

# drawSelection(in:)

Draws the selected row.

## Declaration

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

## Parameters

- `dirtyRect`: The rectangle that requires drawing.

## Discussion

Discussion This method is only called if the selection should be drawn. The selection will automatically be alpha-blended if the selection is animating in or out. The default selection drawn is dependent on the selectionHighlightStyle.

## See Also

### Overriding Row View Display Characteristics

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