TabBarAnimationDelegate
open class TabBarAnimationDelegate : NSObject
TabBarAnimationDelegate is used as the delegate of a TabBarCoordinator’s rootViewController to allow for transitions to specify transition animations.
TabBarAnimationDelegate conforms to the UITabBarControllerDelegate
protocol
and is intended for use as the delegate of one tabbar controller only.
Note
Do not override the delegate of a TabBarCoordinator’s rootViewController-delegate. Instead use the delegate property of the TabBarCoordinator itself.-
See UITabBarControllerDelegate for further reference.
Parameters
- tabBarController: The delegate owner.
- animationController: The animationController to return the interactionController for.
Declaration
Swift
open func tabBarController(_ tabBarController: UITabBarController, interactionControllerFor animationController: UIViewControllerAnimatedTransitioning ) -> UIViewControllerInteractiveTransitioning?
Return Value
If the animationController is a
TransitionAnimation
, it returns its interactionController. Otherwise it requests an interactionController from the TabBarCoordinator’s delegate. -
See UITabBarControllerDelegate for further reference.
Declaration
Swift
open func tabBarController(_ tabBarController: UITabBarController, animationControllerForTransitionFrom fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning?
Parameters
tabBarController
The delegate owner.
fromVC
The source view controller of the transition.
toVC
The destination view controller of the transition.
Return Value
The presentation animation controller from the toVC’s transitioningDelegate. If not present, it uses the TabBarCoordinator’s delegate as fallback.
-
See UITabBarControllerDelegate for further reference.
This method delegates to the TabBarCoordinator’s delegate.
Declaration
Swift
open func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController)
Parameters
tabBarController
The delegate owner.
viewController
The destination viewController.
-
See UITabBarControllerDelegate for further reference.
This method delegates to the TabBarCoordinator’s delegate.
Declaration
Swift
open func tabBarController(_ tabBarController: UITabBarController, shouldSelect viewController: UIViewController) -> Bool
Parameters
tabBarController
The delegate owner.
viewController
The destination viewController.
Return Value
The result of the TabBarCooordinator’s delegate. If not specified, it returns true.
-
See UITabBarControllerDelegate for further reference.
This method delegates to the TabBarCoordinator’s delegate.
Declaration
Swift
open func tabBarController(_ tabBarController: UITabBarController, willBeginCustomizing viewControllers: [UIViewController])
Parameters
tabBarController
The delegate owner.
viewControllers
The source viewControllers.
-
See UITabBarControllerDelegate for further reference.
This method delegates to the TabBarCoordinator’s delegate.
Declaration
Swift
open func tabBarController(_ tabBarController: UITabBarController, didEndCustomizing viewControllers: [UIViewController], changed: Bool)
Parameters
tabBarController
The delegate owner.
viewControllers
The source viewControllers.
-
See UITabBarControllerDelegate for further reference.
This method delegates to the TabBarCoordinator’s delegate.
Declaration
Swift
open func tabBarController(_ tabBarController: UITabBarController, willEndCustomizing viewControllers: [UIViewController], changed: Bool)
Parameters
tabBarController
The delegate owner.
viewControllers
The source viewControllers.