<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableHeaderCell",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTableHeaderCell"
  },
  "title" : "NSTableHeaderCell"
}
-->

# NSTableHeaderCell

An object that a table header view uses to draw the content of the column headers.

```
class NSTableHeaderCell
```

## Overview

Subclasses of the `NSTableHeaderCell` class can override the [`drawInterior(withFrame:in:)`](/documentation/AppKit/NSCell/drawInterior(withFrame:in:)), [`edit(withFrame:in:editor:delegate:event:)`](/documentation/AppKit/NSCell/edit(withFrame:in:editor:delegate:event:)), and [`highlight(_:withFrame:in:)`](/documentation/AppKit/NSCell/highlight(_:withFrame:in:)) methods to change the way headers appear. This specific subclass is responsible for drawing the sort indicators. See the [`NSCell`](/documentation/AppKit/NSCell) class specification for information on overriding these methods.

See the [`NSTableView`](/documentation/AppKit/NSTableView) and [`NSTableHeaderCell`](/documentation/AppKit/NSTableHeaderCell) for more information.

## Topics

### Drawing Sorting Indicators

[`drawSortIndicator(withFrame:in:ascending:priority:)`](/documentation/AppKit/NSTableHeaderCell/drawSortIndicator(withFrame:in:ascending:priority:))

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

[`sortIndicatorRect(forBounds:)`](/documentation/AppKit/NSTableHeaderCell/sortIndicatorRect(forBounds:))

Returns the location to display the sorting indicator given `theRect`.



---

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)