Latest 1.0
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit

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


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

pod "UCDirectionalPanGestureRecognizer"


    self.panRecognizer = [[UCDirectionalPanGestureRecognizer alloc] initWithTarget:self
    self.panRecognizer.direction = UCGestureRecognizerDirectionVertical;
    [self.view addGestureRecognizer:self.panRecognizer];

Running the example project

$ git clone
$ cd UCDirectionalPanGestureRecognizer
$ open UCDirectionalPanGestureRecognizer.xcproj

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


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": "",
    "license": "MIT",
    "authors": {
        "Bryan Oltman": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0"
    "social_media_url": "",
    "platforms": {
        "ios": "8.0"
    "requires_arc": true,
    "source_files": "UCDirectionalPanGestureRecognizer",
    "public_header_files": "UCDirectionalPanGestureRecognizer/*.h",
    "frameworks": "UIKit"

Pin It on Pinterest

Share This