Skip to content

Commit 990a3dc

Browse files
committed
Improved animation curve of zoom transition
1 parent 0000a92 commit 990a3dc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

TOPasscodeViewController/Models/TOPasscodeViewControllerAnimatedTransitioning.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,13 @@ - (void)animateTransition:(id <UIViewControllerContextTransitioning>)transitionC
8686
[transitionContext completeTransition:completed];
8787
};
8888

89+
// If we're animating out from a successful password, play a zooming out animation
90+
// to give some more context
8991
if (self.passcodeSuccess && self.dismissing) {
9092
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform"];
9193
animation.duration = [self transitionDuration:transitionContext];
9294
animation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeScale(0.75f, 0.75f, 1)];
95+
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
9396
[passcodeView.layer addAnimation:animation forKey:@"transform"];
9497
}
9598

0 commit comments

Comments
 (0)