File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ - (void)registerNavigationHooks {
142
142
animationControllerForOperation : (UINavigationControllerOperation)operation
143
143
fromViewController : (MRCViewController *)fromVC
144
144
toViewController : (MRCViewController *)toVC {
145
- if (operation == UINavigationControllerOperationPop ) {
145
+ if (fromVC. interactivePopTransition != nil ) {
146
146
return [[MRCViewControllerAnimatedTransition alloc ] initWithNavigationControllerOperation: operation
147
147
fromViewController: fromVC
148
148
toViewController: toVC];
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ - (void)viewWillDisappear:(BOOL)animated {
148
148
if ([self isMovingFromParentViewController ]) {
149
149
self.snapshot = [self .navigationController.view snapshotViewAfterScreenUpdates: NO ];
150
150
}
151
-
151
+
152
152
// NSLog(@"isMovingToParentViewController: %@", @([self isMovingToParentViewController]));
153
153
// NSLog(@"isMovingFromParentViewController: %@", @([self isMovingFromParentViewController]));
154
154
}
@@ -175,13 +175,12 @@ - (void)handlePopRecognizer:(UIScreenEdgePanGestureRecognizer *)recognizer {
175
175
// Create a interactive transition and pop the view controller
176
176
self.interactivePopTransition = [[UIPercentDrivenInteractiveTransition alloc ] init ];
177
177
[self .navigationController popViewControllerAnimated: YES ];
178
- // [self.viewModel.services popViewModelAnimated:YES];
179
178
} else if (recognizer.state == UIGestureRecognizerStateChanged) {
180
179
// Update the interactive transition's progress
181
180
[self .interactivePopTransition updateInteractiveTransition: progress];
182
181
} else if (recognizer.state == UIGestureRecognizerStateEnded || recognizer.state == UIGestureRecognizerStateCancelled) {
183
182
// Finish or cancel the interactive transition
184
- if (progress > 0.3 ) {
183
+ if (progress > 0.25 ) {
185
184
[self .interactivePopTransition finishInteractiveTransition ];
186
185
} else {
187
186
[self .interactivePopTransition cancelInteractiveTransition ];
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ - (instancetype)initWithNavigationControllerOperation:(UINavigationControllerOpe
31
31
}
32
32
33
33
- (NSTimeInterval )transitionDuration : (id <UIViewControllerContextTransitioning>)transitionContext {
34
- return 0.25 ;
34
+ return 0.5 ;
35
35
}
36
36
37
37
- (void )animateTransition : (id <UIViewControllerContextTransitioning>)transitionContext {
@@ -82,7 +82,7 @@ - (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionCo
82
82
[[transitionContext containerView ] addSubview: toViewController.snapshot];
83
83
[[transitionContext containerView ] sendSubviewToBack: toViewController.snapshot];
84
84
85
- toViewController.snapshot .transform = CGAffineTransformMakeScale (0.97 , 0.97 );
85
+ toViewController.snapshot .transform = CGAffineTransformMakeScale (0.95 , 0.95 );
86
86
87
87
[fromViewController.view addSubview: fromViewController.snapshot];
88
88
You can’t perform that action at this time.
0 commit comments