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");
}
Just tested this and it works: