mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-22 12:08:55 +00:00
Update README.md
This commit is contained in:
17
README.md
17
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!
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user