QTransition library is for easily to add customized view transitioning, in the library including Custom Presentation Controller, UINavigationController Custom Transition, Interactive UINavigationController Transitions. For detail how to use this library, please check Example project. Plus, this library provide a way to use view transition to present Menu.
View Transitioning has always been most complicated and difficult subject in iOS development. Meanwhile native library give few option to animation in view transitioning. Hence, I hope to build a transitioning library can help the community, if you check my code and find it is useful, that would be my pleasure.
Welcome to folk this repo and add more cool view transitioning effects.
- It is really easy to add new type of transition, first just subclass
QBaseTransition
(checking QPushTransition as an example ), and overridinganimateTransition(using transitionContext: UIViewControllerContextTransitioning, fromVC: UIViewController, fromView: UIView, toVC: UIViewController, toView: UIView)
method; - And then a new case in
TransitionOptions
enum,; - Finally, under
QTransition
convenience initializer, switch block, create a new case and pointself.transition
to your own custom view transitioning instance.
fromView
is a view which visible at the beginning;toView
is a view which visiable at the end;
To run the example project, clone the repo, and run pod install
from the Example directory first.
iOS 10 or newer version, Swift 4. I will be really grateful if you interested in this library and want to contribute, if you interested contribute to this repo, please follow https://github.com/raywenderlich/swift-style-guide Swift coding style.
QTransition is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'QTransition'
- Dynamic duration based on the Material Design Motion Guide. Duration is automatically determined by changes to distance and size;
- Interactive Controller and Presentation Controller setup have flaws.
Zefeng Qiu(Will), z9qiu@uwaterloo.ca
QTransition is available under the MIT license. See the LICENSE file for more info.