Skip to content

Commit ee0a754

Browse files
committed
Made zoom animation more subtle
1 parent 611ba43 commit ee0a754

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

TOPasscodeViewController/Models/TOPasscodeViewControllerAnimatedTransitioning.m

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
11
//
22
// TOPasscodeViewControllerAnimatedTransitioning.m
3-
// TOPasscodeViewControllerExample
43
//
5-
// Created by Tim Oliver on 5/15/17.
6-
// Copyright © 2017 Timothy Oliver. All rights reserved.
4+
// Copyright 2017 Timothy Oliver. All rights reserved.
75
//
6+
// Permission is hereby granted, free of charge, to any person obtaining a copy
7+
// of this software and associated documentation files (the "Software"), to
8+
// deal in the Software without restriction, including without limitation the
9+
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10+
// sell copies of the Software, and to permit persons to whom the Software is
11+
// furnished to do so, subject to the following conditions:
12+
//
13+
// The above copyright notice and this permission notice shall be included in
14+
// all copies or substantial portions of the Software.
15+
//
16+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20+
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
21+
// IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
822

923
#import "TOPasscodeViewControllerAnimatedTransitioning.h"
1024
#import "TOPasscodeViewController.h"
@@ -91,15 +105,13 @@ - (void)animateTransition:(id <UIViewControllerContextTransitioning>)transitionC
91105
if (self.success && self.dismissing) {
92106
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform"];
93107
animation.duration = [self transitionDuration:transitionContext];
94-
animation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeScale(0.75f, 0.75f, 1)];
108+
animation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeScale(0.9f, 0.9f, 1)];
95109
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
96110
[passcodeView.layer addAnimation:animation forKey:@"transform"];
97111
}
98112

99113
[UIView animateWithDuration:[self transitionDuration:transitionContext]
100114
delay:0.0f
101-
// usingSpringWithDamping:1.0f
102-
// initialSpringVelocity:0.3f
103115
options:UIViewAnimationOptionAllowUserInteraction
104116
animations:animationBlock
105117
completion:completedBlock];

0 commit comments

Comments
 (0)