Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for UIViewControllerInteractiveTransitioning #1

Open
mpon opened this issue Mar 31, 2015 · 2 comments
Open

Add support for UIViewControllerInteractiveTransitioning #1

mpon opened this issue Mar 31, 2015 · 2 comments

Comments

@mpon
Copy link
Member

mpon commented Mar 31, 2015

If you use this animator in navigation controller animations, it will be disable to use edge swipe gesture to pop a navigation controller.

You can avoid that temporarily like a below code.

- (void)viewDidLoad
{
    [super viewDidLoad];
    // receive interactivePopGestureRecognizer delegate from your UINavigationController
    self.navigationController.interactivePopGestureRecognizer.delegate = self;
}

- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
{
    // remember swiping here
    return YES;
}

- (id <UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController *)navigationController
                                   animationControllerForOperation:(UINavigationControllerOperation)operation
                                                fromViewController:(UIViewController *)fromVC
                                                  toViewController:(UIViewController *)toVC
{
    if (/* if edge swiping */) {
        return nil;
    }
    return animator;
}
@syrakozz
Copy link

syrakozz commented Apr 7, 2015

+1

@xietao3
Copy link

xietao3 commented Jul 15, 2015

good job

roneloza pushed a commit to roneloza/RMPZoomTransitionAnimator that referenced this issue Oct 19, 2017
- Fix causa UINavigationBar no receiving touches.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants