Protocol

UITabBarControllerDelegate

You use the UITabBarControllerDelegate protocol when you want to augment the behavior of a tab bar. In particular, you can use it to determine whether specific tabs should be selected, to perform actions after a tab is selected, or to perform actions before or after the user customizes the order of the tabs. After implementing these methods in your custom object, you should then assign that object to the delegate property of the corresponding UITabBarController object.

Overview

All of the methods in this protocol are optional. For more information on how to use and configure tab bar controllers and their delegates, see View Controller Programming Guide for iOS.

Symbols

Managing Tab Bar Selections

func tabBarController(UITabBarController, shouldSelect: UIViewController)

Asks the delegate whether the specified view controller should be made active.

func tabBarController(UITabBarController, didSelect: UIViewController)

Tells the delegate that the user selected an item in the tab bar.

Managing Tab Bar Customizations

func tabBarController(UITabBarController, willBeginCustomizing: [UIViewController])

Tells the delegate that the tab bar customization sheet is about to be displayed.

func tabBarController(UITabBarController, willEndCustomizing: [UIViewController], changed: Bool)

Tells the delegate that the tab bar customization sheet is about to be dismissed.

func tabBarController(UITabBarController, didEndCustomizing: [UIViewController], changed: Bool)

Tells the delegate that the tab bar customization sheet was dismissed.

Overriding View Rotation Settings

func tabBarControllerSupportedInterfaceOrientations(UITabBarController)

Called to allow the delegate to provide the complete set of supported interface orientations for the tab bar controller.

func tabBarControllerPreferredInterfaceOrientationForPresentation(UITabBarController)

Called to allow the delegate to provide the preferred orientation for presentation of the tab bar controller.

Supporting Custom Tab Bar Transition Animations

func tabBarController(UITabBarController, animationControllerForTransitionFrom: UIViewController, to: UIViewController)

Called to allow the delegate to return a UIViewControllerAnimatedTransitioning delegate object for use during a noninteractive tab bar view controller transition.

func tabBarController(UITabBarController, interactionControllerFor: UIViewControllerAnimatedTransitioning)

Called to allow the delegate to return a UIViewControllerInteractiveTransitioning delegate object for use during an animated tab bar transition.

Relationships

Inherits From