Mac Developer Library

Developer

AppKit Framework Reference NSTableHeaderCell Class Reference

Options
Deployment Target:

On This Page
Language:

NSTableHeaderCell

Inheritance


Conforms To


Import Statement


Swift

import AppKit

Objective-C

@import AppKit;

Availability


Available in OS X v10.0 and later.

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

Subclasses of the NSTableHeaderCell class can override the drawInteriorWithFrame:inView:, editWithFrame:inView:editor:delegate:event:, and highlight:withFrame:inView: methods to change the way headers appear. See the NSCell class specification for information on overriding these methods.

See the NSTableView Class Reference and NSTableHeaderCell Class Reference for more information.

  • 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

    Objective-C

    @import AppKit;

    Swift

    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

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.3 and later.