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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:34:35+00:00 2026-06-07T13:34:35+00:00

So this is very, very weird. I’ve added a Swipe Gesture Recognizer from the

  • 0

So this is very, very weird. I’ve added a Swipe Gesture Recognizer from the starboards into the view for the first tab in my 6-tab tab bar. I set it to the left direction and connected it as an Action to the firstTabViewController.h. And it works perfectly.

Now, if I try to add the “right direction” Swipe Gesture recognizer to this first tab in the same way, the action doesn’t even register.

Also, if I try to do the same thing in another one of the tabs (not the one at index 0), or move the working tab to a different position in the tab bar, the app crashes with a bad access error when I swipe.

firstTabViewController.h

- (IBAction)swipeLeft:(id)sender;   // Works fine
- (IBAction)swipeRight:(id)sender;  // Doesn't even register

firstTabViewController.m

- (IBAction)swipeLeft:(id)sender {
    int nextIndex = CURRENT_INDEX + 1;  // I did modify this accordingly when the tab was moved

    [self.tabBarController setSelectedIndex:nextIndex];
    NSLog(@"Swipe left");

}

- (IBAction)swipeRight:(id)sender {
    NSLog(@"Swiped 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-06-07T13:34:37+00:00Added an answer on June 7, 2026 at 1:34 pm

    Just tested this and it works:

    UISwipeGestureRecognizer *swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeft:)];
    swipeLeft.direction = UISwipeGestureRecognizerDirectionLeft;
    [self.view addGestureRecognizer:swipeLeft];
    swipeLeft.delegate = self;
    [swipeLeft release];
    
    UISwipeGestureRecognizer *swipeRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeRight:)];
    swipeRight.direction = UISwipeGestureRecognizerDirectionRight;
    [self.view addGestureRecognizer:swipeRight];
    swipeRight.delegate = self;
    [swipeRight release];
    
    -(void) swipeRight:(UISwipeGestureRecognizer *) recognizer {
        if (recognizer.direction == UISwipeGestureRecognizerDirectionRight)
            NSLog(@"swipe right");
    }
    
    -(void) swipeLeft:(UISwipeGestureRecognizer *) recognizer {
        if (recognizer.direction == UISwipeGestureRecognizerDirectionLeft)
            NSLog(@"swipe left");
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this very weird results when trying to fetch the AVG() field from
I found this very weird bug that I can't understand. First of all inside
This is very weird. I have the following code: Assert.AreEqual(new DateTime(2000, 1, 1), DateTime.ParseExact(2000,
This is a very weird problem. My app that runs just fine but somehow
i know this question was asked before but i have this very weird beginner
I've found it very weird that simple code like this is not valid: select
You may find this weird, actually very weird, but is the following possible? just
I have a very weird problem that I can't understand. This is C code:
Apologies, as this may seem a very weird question. All of my experience in
All right, this one is going to sound very weird and I don't know

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.