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

# NSTableHeaderView

An object that draws headers over a table view’s columns and handles mouse events in those headers.

```
class NSTableHeaderView
```

## Overview

[`NSTableHeaderView`](/documentation/AppKit/NSTableHeaderView) uses [`NSTableHeaderCell`](/documentation/AppKit/NSTableHeaderCell) to implement its user interface.

## Topics

### Setting the table view

[`tableView`](/documentation/AppKit/NSTableHeaderView/tableView)

The [`NSTableView`](/documentation/AppKit/NSTableView) instance that this table header view belongs to.

### Checking altered columns

[`draggedColumn`](/documentation/AppKit/NSTableHeaderView/draggedColumn)

The index of the column that the user is dragging.

[`draggedDistance`](/documentation/AppKit/NSTableHeaderView/draggedDistance)

The horizontal distance that the user has dragged a column.

[`resizedColumn`](/documentation/AppKit/NSTableHeaderView/resizedColumn)

The index of the column that the user is resizing.

### Utility methods

[`-  columnAtPoint:`](/documentation/AppKit/NSTableHeaderView/column(at:))

Returns the index of the column whose header lies under `aPoint` in the receiver, or –1 if no such column is found.

[`-  headerRectOfColumn:`](/documentation/AppKit/NSTableHeaderView/headerRect(ofColumn:))

Returns the rectangle containing the header tile for the column at `columnIndex`.

## Relationships

### Conforms To

[`NSAccessibilityProtocol`](/documentation/AppKit/NSAccessibilityProtocol)

[`NSStandardKeyBindingResponding`](/documentation/AppKit/NSStandardKeyBindingResponding)

[`NSAppearanceCustomization`](/documentation/AppKit/NSAppearanceCustomization)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`NSAccessibilityElementProtocol`](/documentation/AppKit/NSAccessibilityElementProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSDraggingDestination`](/documentation/AppKit/NSDraggingDestination)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`NSViewToolTipOwner`](/documentation/AppKit/NSViewToolTipOwner)

[`NSUserActivityRestoring`](/documentation/AppKit/NSUserActivityRestoring)

[`NSUserInterfaceItemIdentification`](/documentation/AppKit/NSUserInterfaceItemIdentification)

[`NSAnimatablePropertyContainer`](/documentation/AppKit/NSAnimatablePropertyContainer)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherits From

[`NSView`](/documentation/AppKit/NSView)

---

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)