NSTabViewDelegate Protocol Reference

Conforms to
Framework
/System/Library/Frameworks/AppKit.framework
Availability
Available in OS X v10.6 and later.
Companion guide
Declared in
NSTabView.h

Overview

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

Tasks

Adding and Removing Tabs

Selecting a Tab

Instance Methods

tabView:didSelectTabViewItem:

Informs the delegate that tabView has selected tabViewItem.

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

The tab view that sent the request.

tabViewItem

The tab view item that was selected.

Availability
  • Available in OS X v10.0 and later.
  • Available as part of an informal protocol prior to OS X v10.6.
Declared In
NSTabView.h

tabView:shouldSelectTabViewItem:

Invoked just before tabViewItem in tabView is selected.

- (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

YES if the tab view item should be selected, otherwise NO.

Availability
  • Available in OS X v10.0 and later.
  • Available as part of an informal protocol prior to OS X v10.6.
Declared In
NSTabView.h

tabView:willSelectTabViewItem:

Informs the delegate that tabView is about to select tabViewItem.

- (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.

Availability
  • Available in OS X v10.0 and later.
  • Available as part of an informal protocol prior to OS X v10.6.
Declared In
NSTabView.h

tabViewDidChangeNumberOfTabViewItems:

Informs the delegate that the number of tab view items in tabView has changed.

- (void)tabViewDidChangeNumberOfTabViewItems:(NSTabView *)tabView
Parameters
tabView

The tab view that added or removed tabview items.

Availability
  • Available in OS X v10.0 and later.
  • Available as part of an informal protocol prior to OS X v10.6.
Declared In
NSTabView.h