Protocol: UITabBarControllerDelegate
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.Tells the delegate that the tab bar customization sheet was dismissed.Tells the delegate that the user selected an item in the tab bar.Asks the delegate whether the specified view controller should be made active.Tells the delegate that the tab bar customization sheet is about to be displayed.Tells the delegate that the tab bar customization sheet is about to be dismissed.
Instance Method Summary (collapse)
-
- tabBarController:didEndCustomizingViewControllers:changed:
Tells the delegate that the tab bar customization sheet was dismissed.
-
- tabBarController:didSelectViewController:
Tells the delegate that the user selected an item in the tab bar.
-
- tabBarController:shouldSelectViewController:
Asks the delegate whether the specified view controller should be made active.
-
- tabBarController:willBeginCustomizingViewControllers:
Tells the delegate that the tab bar customization sheet is about to be displayed.
-
- tabBarController:willEndCustomizingViewControllers:changed:
Tells the delegate that the tab bar customization sheet is about to be dismissed.
Instance Method Details
- (Object) tabBarController(tabBarController, didEndCustomizingViewControllers:viewControllers, changed:changed)
Tells the delegate that the tab bar customization sheet was dismissed. You can use this method to respond to changes to the order of tabs in the tab bar.
- (Object) tabBarController(tabBarController, didSelectViewController:viewController)
Tells the delegate that the user selected an item in the tab bar. In iOS v3.0 and later, the tab bar controller calls this method regardless of whether the selected view controller changed. In addition, it is called only in response to user taps in the tab bar and is not called when your code changes the tab bar contents programmatically.In versions of iOS prior to version 3.0, this method is called only when the selected view controller actually changes. In other words, it is not called when the same view controller is selected. In addition, the method was called for both programmatic and user-initiated changes to the selected view controller.
- (Boolean) tabBarController(tabBarController, shouldSelectViewController:viewController)
Asks the delegate whether the specified view controller should be made active. The tab bar controller calls this method in response to the user tapping a tab bar item. You can use this method to dynamically decide whether a given tab should be made the active tab.
- (Object) tabBarController(tabBarController, willBeginCustomizingViewControllers:viewControllers)
Tells the delegate that the tab bar customization sheet is about to be displayed.
- (Object) tabBarController(tabBarController, willEndCustomizingViewControllers:viewControllers, changed:changed)
Tells the delegate that the tab bar customization sheet is about to be dismissed. This method is called in response to the user tapping the Done button on the sheet but before the sheet is dismissed.