From 3d41ca895cacf11d3c57bbdedcb7fd8e26fb6a44 Mon Sep 17 00:00:00 2001 From: Brandon Withrow Date: Tue, 8 Aug 2017 14:48:26 -0700 Subject: [PATCH] Update README.md --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index b25657627b..badbcde371 100644 --- a/README.md +++ b/README.md @@ -188,6 +188,21 @@ animationView.play(fromProgress: 0.25, toProgress: 0.5, withCompletion: nil) Lottie comes with a `UIViewController` animation-controller for making custom viewController transitions! +![Transition1](_Gifs/transitionMasked.gif) +![Transition2](_Gifs/transitionPosition.gif) + +Just become the delegate for a transition + +```objective-c +- (void)_showTransitionA { + ToAnimationViewController *vc = [[ToAnimationViewController alloc] init]; + vc.transitioningDelegate = self; + [self presentViewController:vc animated:YES completion:NULL]; +} +``` + +And implement the delegate methods with a `LOTAnimationTransitionController` + ```objective-c #pragma mark -- View Controller Transitioning @@ -211,6 +226,8 @@ return animationController; ``` +By setting `applyAnimationTransform` to YES you can make the Lottie animation move the from and to view controllers. They will be positioned at the origin of the layer. When set to NO Lottie just masks the view controller with the specified layer while resepecting z order. + ## Debugging Lottie has a couple of debugging features to know about. When an animation is loaded unsupported features are logged out in the console with their function names.