Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6162991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:45:04+00:00 2026-05-23T21:45:04+00:00

I have 2 GestureRecognizers that when triggered at the same need to trigger an

  • 0

I have 2 GestureRecognizers that when triggered at the same need to trigger an animation.

I have 2 booleans, 1 for each, that get set to yes when the gesture is recognized.

My issue is that I need to be able to do a check in one recognizer to see if the other recognizer has been triggered.

I currently do the following

[self registerRecognizer:swipeRecognizerRight 
       onRecognizedBlock:^(UIGestureRecognizer *recognizer) {
    NSLog(@"pulled to right");
    leftPulled = TRUE;

    if (rightPulled) {
        [self->delegate executeActionString:someAnimation];       
    }

    leftPulled = FALSE;
}];

and the same for the recognizer on the right.

leftPulled and rightPulled are the actual objects, one on the left, one on the right.

My issue is that the one recognizer gets executed before the other so there will never be a situation when both are recognized and trigger the animation.

How can this be solved? Some kind of timer, or is there a way to code the recognizers so that both can be recognized at the same time and then trigger the animation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:45:05+00:00Added an answer on May 23, 2026 at 9:45 pm

    You will find your way I think, in a UIGestureRecognizerDelegate protocol method :

    -(BOOL)gestureRecognizer:(UIGestureRecognizer *)g1
    shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)g2;
    

    In your case this method should return YES in both cases ( ...:g1 ...:g2 and ...:g2 ...:g1 ), to let the two gestures be recognised at the same time, either beginning with g1, or g2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my app I have added the new Gesture Recognizers that are available in
I have attached 3 tap gesture recognizers to the same view - single, double
Has anyone managed to get the gesture recognition working in cocos-2d? I have read
I have a UIView that I set up to respond to pinch gestures and
Have you managed to get Aptana Studio debugging to work? I tried following this,
I have an iPad app where I have a view controller that is the
I have placed the uiscrollview for viewcontroller. Then I have set my large size
Are there known issues with gesture recognizers and the UIView class methods for animation?
Have created simple Ajax enabled contact forms before that have around 12 fields -
Have a LinqtoSql query that I now want to precompile. var unorderedc = from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.