Instance Method

tabViewItemForViewController:

Returns the tab view item for the specified child view controller.

Declaration

- (NSTabViewItem *)tabViewItemForViewController:(NSViewController *)viewController;

Parameters

viewController

The child view controller whose tab view item you want.

Return Value

The tab view item associated with the view controller or nil if the view controller is not managed by the tab view controller.

Discussion

This method is a convenient way to map a tab view item to a newly added child view controller. When you add child view controllers using the addChildViewController: method, the tab view automatically controller creates a new tab view item. Use this method to fetch that tab view item and configure it.

See Also

Managing Tab View Items

tabViewItems

The array of tab view items used to manage each of the child view controllers.

- addTabViewItem:

Adds the specified tab to the end of the tab view controller’s list of tabs.

- insertTabViewItem:atIndex:

Inserts a tab view into the tab view controller’s list of tabs.

- removeTabViewItem:

Removes the specified tab view item from the tab view controller.

selectedTabViewItemIndex

The index of the selected tab.