iOS 7 sports a new gesture, swiping left to right across the screen as a shortcut for the Back button in a UINavigationController.
My app does not seem to be picking up this behavior for free. What do I need to do to make this gesture available to my iOS app (built for iOS 5.1 and later in Xcode 4.6.3)?
Here's an article with video, The new gesture in iOS 7 you want to know about, from a user's perspective.
The answer may have something to do with interactivePopGestureRecognizer which is a UIGestureRecognizer subclass.
It should work automatically if the back button is visible. If you are displaying a leftBarButtonItem instead of the back button, the gesture will not be present by default. Also, if you are using a UINavigationBar but not a UINavigationController, you won't see this functionality.
If you are using a UINavigationController and your view controller's navigation item contains a leftBarButtonItem, it's still possible to add functionality for the swipe left to right gesture of the navigation controller, by attaching a delegate to the navigation controller's interactivePopGestureRecognizer.
EDIT: I didn't notice that you're building against SDK 5.1. This is a new feature in the iOS 7 SDK, so I believe you'll need to build with Xcode 5 against the iOS 7 SDK in order to make use of the new feature.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With