Mac Developer Library

Developer

AppKit Framework Reference NSTableHeaderCell Class Reference

Options
Deployment Target:

On This Page
Language:

NSTableHeaderCell

The NSTableHeaderCell class is used by an NSTableHeaderView in NSTableHeaderView Class Reference instance to draw the content of the column headers. This specific subclass is responsible for drawing the sort indicators. More...

Inheritance


Import Statement


import AppKit @import AppKit;

Availability


Available in OS X v10.0 and later.
  • Draws a sorting indicator given a cell frame contained inside a view.

    Declaration

    Swift

    func drawSortIndicatorWithFrame(_ cellFrame: NSRect, inView controlView: NSView, ascending ascending: Bool, priority priority: Int)

    Objective-C

    - (void)drawSortIndicatorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView ascending:(BOOL)ascending priority:(NSInteger)priority

    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

    Override this method to customize the sorting user interface.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.3 and later.

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

    Declaration

    Swift

    func sortIndicatorRectForBounds(_ theRect: NSRect) -> NSRect

    Objective-C

    - (NSRect)sortIndicatorRectForBounds:(NSRect)theRect

    Parameters

    theRect

    A cell rectangle.

    Return Value

    The rectangle within theRect that should contain the sorting indicator.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.3 and later.