UITabBarControllerDelegate
A set of methods you implement to customize the behavior of a tab bar.
Declaration
@MainActor protocol UITabBarControllerDelegate : NSObjectProtocolMentioned in
Overview
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.
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.
Topics
Managing tab bar selections
Managing tab bar customizations
tabBarController(_:willBeginCustomizing:)tabBarController(_:willEndCustomizing:changed:)tabBarController(_:didEndCustomizing:changed:)
Overriding view rotation settings
tabBarControllerSupportedInterfaceOrientations(_:)tabBarControllerPreferredInterfaceOrientationForPresentation(_:)
Supporting custom tab bar transition animations
tabBarController(_:animationControllerForTransitionFrom:to:)tabBarController(_:interactionControllerFor:)
Instance Methods
tabBarController(_:didSelectTab:previousTab:)tabBarController(_:displayOrderDidChangeFor:)tabBarController(_:displayedViewControllersFor:proposedViewControllers:)tabBarController(_:shouldSelectTab:)tabBarController(_:tab:acceptItemsFrom:)tabBarController(_:tab:operationForAcceptingItemsFrom:)tabBarController(_:visibilityDidChangeFor:)tabBarControllerDidEndEditing(_:)tabBarControllerWillBeginEditing(_:)