Mac Developer Library

Developer

AppKit Framework Reference NSTableHeaderView Class Reference

Options
Deployment Target:

On This Page
Language:

NSTableHeaderView

Inheritance


Conforms To


Import Statement


Swift

import AppKit

Objective-C

@import AppKit;

Availability


Available in OS X v10.0 and later.

An NSTableHeaderView is used by an NSTableView to draw headers over its columns and to handle mouse events in those headers.

NSTableHeaderView uses NSTableHeaderCell to implement its user interface.

  • tableView tableView Property

    The NSTableView instance that this table header view belongs to.

    Declaration

    Swift

    unowned(unsafe) var tableView: NSTableView?

    Objective-C

    @property(assign) NSTableView *tableView

    Discussion

    You should never need to set this property; it’s assigned automatically when you set the header view for an NSTableView.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.

    See Also

    headerView (NSTableView)

  • The index of the column that the user is dragging. (read-only)

    Declaration

    Swift

    var draggedColumn: Int { get }

    Objective-C

    @property(readonly) NSInteger draggedColumn

    Discussion

    If the user is dragging a column, this property contains the index of that column; otherwise, it contains -1.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.

    See Also

    draggedDistance

  • The horizontal distance that the user has dragged a column. (read-only)

    Declaration

    Swift

    var draggedDistance: CGFloat { get }

    Objective-C

    @property(readonly) CGFloat draggedDistance

    Discussion

    If the user is dragging a column, this property contains that column’s horizontal distance from its original position; otherwise, the property’s value is undefined.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.

    See Also

    draggedColumn

  • The index of the column that the user is resizing. (read-only)

    Declaration

    Swift

    var resizedColumn: Int { get }

    Objective-C

    @property(readonly) NSInteger resizedColumn

    Discussion

    If the user is resizing a column, this property contains the index of that column; otherwise, it contains -1.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.

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

    Declaration

    Swift

    func columnAtPoint(_ point: NSPoint) -> Int

    Objective-C

    - (NSInteger)columnAtPoint:(NSPoint)point

    Discussion

    aPoint is expressed in the receiver’s coordinate system.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.

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

    Declaration

    Swift

    func headerRectOfColumn(_ column: Int) -> NSRect

    Objective-C

    - (NSRect)headerRectOfColumn:(NSInteger)column

    Discussion

    Raises an NSInternalInconsistencyException if columnIndex is out of bounds.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.

    See Also

    – rectOfColumn: (NSTableView)