---
title: "drawSortIndicator(withFrame:in:ascending:priority:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstableheadercell/drawsortindicator(withframe:in:ascending:priority:)"
---

# drawSortIndicator(withFrame:in:ascending:priority:)

Draws a sorting indicator given a cell frame contained inside a view.

## Declaration

```swift
func drawSortIndicator(withFrame cellFrame: NSRect, in controlView: NSView, ascending: Bool, priority: Int)
```

## Parameters

- `cellFrame`: The cell frame.
- `controlView`: The control view.
- `ascending`: If YES the sort indicator is drawn as ascending; otherwise it is drawn as descending.
- `priority`: If priority is 0, this is the primary sort indicator.

## Discussion

Discussion Override this method to customize the sorting user interface.

## See Also

### Related Documentation

- [NSTableHeaderCell](appkit/nstableheadercell.md)

### Drawing Sorting Indicators

- [sortIndicatorRect(forBounds:)](appkit/nstableheadercell/sortindicatorrect(forbounds:).md)
