XTransitionKit
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requirements
- iOS 9.0+
- Swift 5.0+
Installation
XTransitionKit is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'XTransitionKit'
Features
- Present & dismiss transitioning animation.
- Push & pop transitioning animation.
- Tab bar transitioning animation.
Examples
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())
Delegate
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.
Author
Leo, [email protected]
License
XTransitionKit is available under the MIT license. See the LICENSE file for more info.