I am working to make my iPhone app compatible for the iPad. The user can tap or swipe the screen to activate certain functions, and it works fine on my iPhone version. There is a UIScrollView on the page which I have subclassed to make it "swipeable," i.e. it passes up all of its touch functions to its superview as such:
@implementation SwipeableScrollView
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[super touchesBegan:touches withEvent:event];
[self.superview touchesBegan:touches withEvent:event];
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
[super touchesMoved:touches withEvent:event];
[self.superview touchesMoved:touches withEvent:event];
}
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
[super touchesEnded:touches withEvent:event];
[self.superview touchesEnded:touches withEvent:event];
}
@end
This works fine on the iPhone version, passing both taps and swipe gestures, but on the iPad, I get the following strange behavior:
- Taps are passed to the superview properly.
- But, swipe gestures are not passed at all.
Any idea why this would be working on the iPhone but not the iPad?