Mac Developer Library

Developer

AppKit Framework Reference NSTabViewDelegate Protocol Reference

Options
Deployment Target:

On This Page
Language:

NSTabViewDelegate

Inheritance


Not Applicable

Import Statement


Swift

import AppKit

Objective-C

@import AppKit;

Availability


Available in OS X v10.6 and later.

The NSTabViewDelegate protocol defines the optional methods implemented by delegates of NSTabView objects.

  • Invoked just before tabViewItem in tabView is selected.

    Declaration

    Swift

    optional func tabView(_ tabView: NSTabView, shouldSelectTabViewItem tabViewItem: NSTabViewItem?) -> Bool

    Objective-C

    - (BOOL)tabView:(NSTabView *)tabView shouldSelectTabViewItem:(NSTabViewItem *)tabViewItem

    Parameters

    tabView

    The tab view that sent the request.

    tabViewItem

    The tab view item to select.

    Return Value

    YEStrue if the tab view item should be selected, otherwise NOfalse.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.

    Available as part of an informal protocol prior to OS X v10.6.

  • Informs the delegate that tabView is about to select tabViewItem.

    Declaration

    Swift

    optional func tabView(_ tabView: NSTabView, willSelectTabViewItem tabViewItem: NSTabViewItem?)

    Objective-C

    - (void)tabView:(NSTabView *)tabView willSelectTabViewItem:(NSTabViewItem *)tabViewItem

    Parameters

    tabView

    The tab view that sent the request.

    tabViewItem

    The tab view item that is about to be selected.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.

    Available as part of an informal protocol prior to OS X v10.6.

  • Informs the delegate that tabView has selected tabViewItem.

    Declaration

    Swift

    optional func tabView(_ tabView: NSTabView, didSelectTabViewItem tabViewItem: NSTabViewItem?)

    Objective-C

    - (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem

    Parameters

    tabView

    The tab view that sent the request.

    tabViewItem

    The tab view item that was selected.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.

    Available as part of an informal protocol prior to OS X v10.6.