Latest 1.0
Homepage https://github.com/UrbanCompass/UCDirectionalPanGestureRecognizer
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

A gesture recognizer that detects panning in one dimension. Taken from this StackOverflow answer and adapted to Objective C.

Installation

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

pod "UCDirectionalPanGestureRecognizer"

Usage

    self.panRecognizer = [[UCDirectionalPanGestureRecognizer alloc] initWithTarget:self
                                                                            action:@selector(viewPanned:)];
    self.panRecognizer.direction = UCGestureRecognizerDirectionVertical;
    [self.view addGestureRecognizer:self.panRecognizer];

Running the example project

$ git clone https://github.com/UrbanCompass/UCDirectionalPanGestureRecognizer.git
$ cd UCDirectionalPanGestureRecognizer
$ open UCDirectionalPanGestureRecognizer.xcproj

Once in Xcode, ensure the target is UCDirectionalPanGestureRecognizerExample, build, and run.

License

This project is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "UCDirectionalPanGestureRecognizer",
    "version": "1.0",
    "summary": "A pan gesture recognizer that only recognizes panning on one axis",
    "description": "A subclass of UIPanGestureRecognizer than can be configured to only recognize vertical or horizontal panning",
    "homepage": "https://github.com/UrbanCompass/UCDirectionalPanGestureRecognizer",
    "license": "MIT",
    "authors": {
        "Bryan Oltman": "[email protected]"
    },
    "source": {
        "git": "https://github.com/UrbanCompass/UCDirectionalPanGestureRecognizer.git",
        "tag": "1.0"
    },
    "social_media_url": "https://twitter.com/moltman",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "UCDirectionalPanGestureRecognizer",
    "public_header_files": "UCDirectionalPanGestureRecognizer/*.h",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This