Latest 0.2
Homepage https://github.com/arvindhsukumar/PanGestureView
License MIT
Platforms ios 8.0
Authors

PanGestureView allows you to attach custom actions that will be triggered when the user pans the view. Think of it as a swipeable UITableViewCell, but as a generic UIView.

GIF 1

Installation

Install using cocoapods: pod 'PanGestureView', '~> 0.1'

Usage:

Add an instance of PanGestureView as a subview in any of your views. Any other subviews you need can be added to the contentView of the PanGestureView.

Actions can be added as follows:

let action = PanGestureAction(swipeDirection: PanGestureViewSwipeDirection.Right, image: UIImage(named: ...)!)

// BG color of the actionView
action.backgroundColor = UIColor(...)

// Tint color of the provided UIImage. Images are automatically converted to their template versions using `imageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate)`
action.tintColor = UIColor(...)

// Trigger handling
action.didTriggerBlock = {
    direction in

    // Handle action

}

panGestureView.addAction(action)

One action per swipe direction is supported.

License

PanGestureView is available under the MIT License.

Latest podspec

{
    "name": "PanGestureView",
    "version": "0.2",
    "summary": "UIView subclass that allows you to trigger actions based on Pan Gestures.",
    "description": "PanGestureView allows you to attach custom actions that will be triggered when the user pans the view. Think of it as a swipeable UITableViewCell, but as a generic UIView.",
    "homepage": "https://github.com/arvindhsukumar/PanGestureView",
    "screenshots": "http://i.imgur.com/P2E8ANB.gif",
    "license": "MIT",
    "authors": {
        "Arvindh Sukumar": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/arvindhsukumar/PanGestureView.git",
        "tag": "0.2"
    },
    "source_files": [
        "Classes",
        "Classes/**/*.{h,m}"
    ],
    "exclude_files": "Classes/Exclude"
}

Pin It on Pinterest

Share This