UIPopoverController gesture handling in UISplitViewController for iOS 5.1 and below
- by 5StringRyan
I've (along with many others) have noticed that Apple changed the appearance of the popover controller to use a "slider" window rather than the usual "popover" tableview that I've used. While I'm okay with the new appearance, like others I'm having issues with the swipe gesture that is introduced:
iOS 5.1 swipe gesture hijacked by UISplitViewController - how to avoid?
The fix for this seems to be to set the split view controller method "presentWithGesture" to "NO."
UISplitViewController *splitViewController = [[UISplitViewController alloc] init];
splitViewController.presentsWithGesture = NO;
This works great if the user is using iOS 5.1, however, if this code is run using iOS 5.0 or below, an exception is thrown since this method is only available for iOS 5.1:
Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[UISplitViewController setPresentsWithGesture:]: unrecognized selector
Is it possible to get rid of this gesture without using this method so that it's backwards compatible with iOS' 5.0 and below?