removeTabViewItem(_:)
Removes the specified tab view item from the tab view controller.
Declaration
func removeTabViewItem(_ tabViewItem: NSTabViewItem)Parameters
- tabViewItem:
The tab view item to remove. If this parameter is
nilor the item does not belong to the tab view controller, this method throws an exception.
Discussion
Use this method to remove a tab view item from the tab view interface. Removing the item removes the corresponding view controller from the tab view controller’s list of child view controllers. If the removed tab view item is currently selected, the tab view controller selects the next item (or the previous item if there is no next item). Removing the last tab view item sets the selectedTabViewItemIndex property to -1.