To run the example project, clone the repo, and run pod install
from the Example directory first.
- iOS 9.0+
- Swift 5.0+
XTransitionKit is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'XTransitionKit'
- Present & dismiss transitioning animation.
- Push & pop transitioning animation.
- Tab bar transitioning animation.
You can use the animation effects that have been implemented.
func setup(animationType: AnimationType?, interactionType: InteractionType?)
Or you can use custom animation effects, just implement the Animation or Interaction protocol.
func setup(animation: Animation?, interaction: Interaction?)
Example for UIViewController / UINavigationController / UITabbarController
controller.tk.setup(animationType: .flip, interactionType: .horizontal)
controller.tk.setup(animation: FlipAnimation(), interactionType: HorizontalInteraction())
It is worth noting that the original delegate method can no longer be used.
So, If you still need to use UIViewControllerTransitioningDelegate / UINavigationControllerDelegate / UITabBarControllerDelegate. A delegate is provided here.
controller.tk.delegate = controller
Then implement TransitionKitDelegate๏ผ It's the same as the original method.
Leo, [email protected]
XTransitionKit is available under the MIT license. See the LICENSE file for more info.