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 6538723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:46:10+00:00 2026-05-25T10:46:10+00:00

I have a method to handle a double swipe gesture I declared elsewhere: -(void)handleDoubleSwipe:(UISwipeGestureRecognizer

  • 0

I have a method to handle a double swipe gesture I declared elsewhere:

-(void)handleDoubleSwipe:(UISwipeGestureRecognizer *)recognizer
{
    NSLog(@"double swiped");
    if(recognizer.direction==UISwipeGestureRecognizerDirectionLeft) {
        NSLog(@"swiped left");
     }
     if(recognizer.direction==UISwipeGestureRecognizerDirectionRight) {
         NSLog(@"swiped right");
     }

}

and I declare it elsewhere as:

    UISwipeGestureRecognizer *doubleSwipe=[[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleDoubleSwipe:)];
    doubleSwipe.numberOfTouchesRequired=2;
    doubleSwipe.delegate=self;
    doubleSwipe.direction=UISwipeGestureRecognizerDirectionRight | UISwipeGestureRecognizerDirectionLeft;

The problem is that I’m unable to feed the selector with any parameters. It just doesn’t allow me to and autocomplete returns 0 completions. How would I add the doubleSwipe gesture to the parameter for the selector? Right now, the handleDoubleSwipe method does get called and NSLog displays “double swiped” but doesn’t display swiped left or right.

  • 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-25T10:46:11+00:00Added an answer on May 25, 2026 at 10:46 am

    The direction property of the recognizer tells you about the direction(s) the recognizer handles (just as you configured it), not the direction of the actual swipe.

    You can use the locationInView: method in combination with the state property to determine where the swipe started and ended.

    It may be easier though to use one recognizer for each direction.

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

Sidebar

Related Questions

I have my resource and they typical overridden method to handle POST requests. public
I have a UI question that troubled me on the best method to handle
I have a method which takes params object[] such as: void Foo(params object[] items)
I have added two gesture recognizers to a view. One will handle the view
I have an action bean in my stripes application. The default handler/method will display
I have an event handler bound to the hover event using the .hover method,
I have method in a class that I need to make sure is only
I have class method that returns a list of employees that I can iterate
I have a method that where I want to redirect the user back to
I have a method in my Python code that returns a tuple - a

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.