TabsControlDelegate

Undocumented

  • Determine if the tab can be selected.

    Declaration

    Swift

    @objc optional func tabsControl(_ control: TabsControl, canSelectItem item: AnyObject) -> Bool

    Parameters

    tabControl

    The instance of the tabs control.

    item

    The item representing the given tab.

    Return Value

    A boolean value indicating whether the tab can be selected or not.

  • If implemented, the delegate is informed that the selected tab did change. See also TabsControlSelectionDidChangeNotification

    Declaration

    Swift

    @objc optional func tabsControlDidChangeSelection(_ control: TabsControl, item: AnyObject)

    Parameters

    tabControl

    The instance of the tabs control.

    item

    The item representing the selected tab.

  • Return true if the tab is allowed to be reordered (by being dragged with the mouse). This method has no effect if the one below is not implemented.

    Declaration

    Swift

    @objc optional func tabsControl(_ control: TabsControl, canReorderItem item: AnyObject) -> Bool

    Parameters

    tabControl

    The instance of the tabs control.

    item

    The item representing the given tab.

    Return Value

    A boolean value indicating whether the tab can be reordered or not.

  • If implemented, the delegate is informed that the tabs have been reordered. It is the delegate responsability to store the new order of items. If not stored, the tabs will recover their original order.

    Declaration

    Swift

    @objc optional func tabsControl(_ control: TabsControl, didReorderItems items: [AnyObject])

    Parameters

    tabControl

    The instance of the tabs control.

    items

    The array the items following the new orders.

  • Return true if you allow the editing of the title of the tab. By default, titles are not editable. This method has no effect if the one below is not implemented.

    Declaration

    Swift

    @objc optional func tabsControl(_ control: TabsControl, canEditTitleOfItem item: AnyObject) -> Bool

    Parameters

    tabControl

    The instance of the tabs control.

    item

    The item representing the given tab.

    Return Value

    A boolean value indicating whether the tab title can be edited or not.

  • If implemented, the delegate is informed that the tab has been renamed to the given title. Again, it is the delegate responsability to store the new title.

    Declaration

    Swift

    @objc optional func tabsControl(_ control: TabsControl, setTitle newTitle: String, forItem item: AnyObject)

    Parameters

    tabControl

    The instance of the tabs control.

    newTitle

    The new title value.

    item

    The item representing the given tab.