Skip to content
UINavigationController delegate that allows swipe back gesture to be started from anywhere on the screen (not just from the edge).
Branch: master
Clone or download
Latest commit 90e1566 Apr 2, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Classes Add Sloppy Swiper delegate. Mar 11, 2017
Example Fix build error in the example project Apr 19, 2015
.gitignore Add unimportant files to .gitignore May 29, 2014
CHANGELOG.md Release 0.6 Apr 2, 2017
LICENSE Move the licensing info from README.md to LICENSE Jun 29, 2014
README.md
Rakefile
SloppySwiper.podspec
demo.gif

README.md

SloppySwiper

License: MIT CocoaPods

SloppySwiper is a UINavigationController delegate that allows swipe back gesture to be started from anywhere on the screen (not only from the left edge).

Note

  • the library recreates the default pop animation, so it doesn't look exactly the same as when interactivePopGestureRecognizer is used:
  • the gesture can collide with other pan to the right gestures
  • If you're having problems with a UINavigationController inside of a UITabBarController that is causing the UITabBar to pop out of view during the animation process, you'll want to implement the SloppySwiperDelegate protocol and return NO for calls to -(BOOL)sloppySwiperShouldAnimateTabBar:(SloppySwiper *)swiper.

Demo GIF

Usage

SloppySwiper can be set either in the Interface Builder or in code. The IB usage is presented in the example project (see Navigation Controller Scene in Main.storyboard). You can set it up programmatically as follows:

#import "SloppySwiper.h"
...
@property (strong, nonatomic) SloppySwiper *swiper;
...
self.swiper = [[SloppySwiper alloc] initWithNavigationController:navigationController];
navigationController.delegate = self.swiper;

Demo

To run the example project; clone the repo, and run pod install from the Example directory first. Alternatively, run pod try SloppySwiper from the command line.

Requirements

  • iOS 7
  • ARC

Installation

SloppySwiper is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "SloppySwiper"

Author

Arkadiusz Holko:

Credits

I'd like to thank:

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.