OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "ios/clean/chrome/browser/ui/animators/zoom_transition_controller.h" | 5 #import "ios/clean/chrome/browser/ui/transitions/zoom_transition_controller.h" |
6 | 6 |
7 #import "ios/clean/chrome/browser/ui/animators/zoom_transition_animator.h" | 7 #import "ios/clean/chrome/browser/ui/transitions/animators/zoom_transition_anima
tor.h" |
8 | 8 |
9 @implementation ZoomTransitionController | 9 @implementation ZoomTransitionController |
10 @synthesize presentationKey = _presentationKey; | 10 @synthesize presentationKey = _presentationKey; |
11 | 11 |
12 #pragma mark - UIViewControllerTransitioningDelegate | 12 #pragma mark - UIViewControllerTransitioningDelegate |
13 | 13 |
14 - (id<UIViewControllerAnimatedTransitioning>) | 14 - (id<UIViewControllerAnimatedTransitioning>) |
15 animationControllerForPresentedController:(UIViewController*)presented | 15 animationControllerForPresentedController:(UIViewController*)presented |
16 presentingController:(UIViewController*)presenting | 16 presentingController:(UIViewController*)presenting |
17 sourceController:(UIViewController*)source { | 17 sourceController:(UIViewController*)source { |
18 ZoomTransitionAnimator* animator = [[ZoomTransitionAnimator alloc] init]; | 18 ZoomTransitionAnimator* animator = [[ZoomTransitionAnimator alloc] init]; |
19 animator.presenting = YES; | 19 animator.presenting = YES; |
20 animator.presentationKey = self.presentationKey; | 20 animator.presentationKey = self.presentationKey; |
21 [animator selectDelegate:@[ source, presenting ]]; | 21 [animator selectDelegate:@[ source, presenting ]]; |
22 return animator; | 22 return animator; |
23 } | 23 } |
24 | 24 |
25 - (id<UIViewControllerAnimatedTransitioning>) | 25 - (id<UIViewControllerAnimatedTransitioning>) |
26 animationControllerForDismissedController:(UIViewController*)dismissed { | 26 animationControllerForDismissedController:(UIViewController*)dismissed { |
27 ZoomTransitionAnimator* animator = [[ZoomTransitionAnimator alloc] init]; | 27 ZoomTransitionAnimator* animator = [[ZoomTransitionAnimator alloc] init]; |
28 animator.presenting = NO; | 28 animator.presenting = NO; |
29 animator.presentationKey = self.presentationKey; | 29 animator.presentationKey = self.presentationKey; |
30 [animator selectDelegate:@[ dismissed.presentingViewController ]]; | 30 [animator selectDelegate:@[ dismissed.presentingViewController ]]; |
31 return animator; | 31 return animator; |
32 } | 32 } |
33 | 33 |
34 @end | 34 @end |
OLD | NEW |