GithubHelp home page GithubHelp logo

ogerets / sloppyswiper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fastred/sloppyswiper

0.0 1.0 0.0 194 KB

UINavigationController delegate that allows swipe back gesture to be started from anywhere on the screen (not just from the edge).

License: MIT License

Objective-C 79.24% Ruby 20.76%

sloppyswiper's Introduction

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:

sloppyswiper's People

Contributors

fastred avatar gwesley avatar jaeheeko avatar joshzngf avatar nonamelive avatar readmecritic avatar renssies avatar stephenbalaban avatar yusuga avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.