Update README.md

This commit is contained in:
Brandon Withrow
2017-08-08 14:48:26 -07:00
committed by GitHub
parent 8a358a65e8
commit 3d41ca895c

View File

@@ -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.