All Projects â†’ marcbaldwin â†’ Gesturerecognizerclosures

marcbaldwin / Gesturerecognizerclosures

Licence: mit
Closure support for handling gesture recognizers in Swift.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Gesturerecognizerclosures

Any Touch
👋 手势库, 按需2kb~5kb, 兼容PC / 移动端
Stars: ✭ 567 (+575%)
Mutual labels:  tap, swipe, pan
Swipycell
Easy to use UITableViewCell implementing swiping to trigger actions.
Stars: ✭ 230 (+173.81%)
Mutual labels:  cocoapods, swipe
Androiduigesturerecognizer
AndroidGestureRecognizer is an Android implementation of the Apple's UIGestureRecognizer framework
Stars: ✭ 119 (+41.67%)
Mutual labels:  tap, swipe
gestures
A library for normalized events and gesture for desktop and mobile.
Stars: ✭ 31 (-63.1%)
Mutual labels:  tap, swipe
XamarinFormsGesture
Xamarin Form Gesture Effects
Stars: ✭ 85 (+1.19%)
Mutual labels:  tap, swipe
React Cursor Position
A React component that decorates its children with mouse and touch coordinates relative to itself.
Stars: ✭ 136 (+61.9%)
Mutual labels:  tap, pan
Swipeabletabbarcontroller
UITabBarController with swipe interaction between its tabs.
Stars: ✭ 919 (+994.05%)
Mutual labels:  cocoapods, swipe
Rxgesture
RxSwift reactive wrapper for view gestures
Stars: ✭ 1,069 (+1172.62%)
Mutual labels:  swipe, pan
Qmchatviewcontroller Ios
An elegant ready to go chat view controller for iOS applications
Stars: ✭ 75 (-10.71%)
Mutual labels:  cocoapods
Silentscrolly
Scroll to hide navigationBar, tabBar and toolBar.
Stars: ✭ 79 (-5.95%)
Mutual labels:  cocoapods
Ctshowcase
A simple to use Showcase library that can highlight arbitrary views in an iOS app
Stars: ✭ 73 (-13.1%)
Mutual labels:  cocoapods
Water
A simple TUN/TAP library written in native Go.
Stars: ✭ 1,198 (+1326.19%)
Mutual labels:  tap
Abmediaview
Media view which subclasses UIImageView, and can display & load images, videos, GIFs, and audio and from the web, and has functionality to minimize from fullscreen, as well as show GIF previews for videos.
Stars: ✭ 79 (-5.95%)
Mutual labels:  swipe
Notificationz
📡 Helping you own NotificationCenter in Swift!
Stars: ✭ 74 (-11.9%)
Mutual labels:  cocoapods
Sfacecompare
Simple lib for iOS to find and compare faces.
Stars: ✭ 83 (-1.19%)
Mutual labels:  cocoapods
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (+1304.76%)
Mutual labels:  cocoapods
Timelinetableviewcell
Simple timeline view implemented by UITableViewCell
Stars: ✭ 1,178 (+1302.38%)
Mutual labels:  cocoapods
Rsformview
A Cocoapods library designed to easily create forms with multiple data entry fields
Stars: ✭ 84 (+0%)
Mutual labels:  cocoapods
Sstoastmessage
SSToastMessage is written purely in SwiftUI. It will add toast, alert, and floating message view over the top of any view. It is intended to be simple, lightweight, and easy to use. It will be a popup with a single line of code.
Stars: ✭ 82 (-2.38%)
Mutual labels:  cocoapods
Swiftlinkpreview
It makes a preview from an URL, grabbing all the information such as title, relevant texts and images.
Stars: ✭ 1,216 (+1347.62%)
Mutual labels:  cocoapods

Gesture Recognizer Closures

Swift 5 Platform License Pod Build Status

Closure handlers for gesture recognizers, controls and bar button items.

GestureRecognizerClosures supports

Gesture Recognizer Examples

Example of handling a single tap

view.onTap { _ in
    // Do something
}

Example of handling a double tap

view.onDoubleTap { _ in
    // Do something
}

Example of handling a long press

view.onLongPress { _ in
    // Do something
}

Example of handling a pinch

view.onPinch { pinch in
    // Do something
}

Example of handling a pan

view.onPan { pan in
    // Do something
}

Example of handling a rotation

view.onRotate { rotate in
    // Do something
}

Example of handling a screen edge pan

view.onScreenEdgePan { _ in
    // Do something
}

Example of handling a swipe left

view.onSwipeLeft { _ in
    // Do something
}

Example of handling a swipe right

view.onSwipeRight { _ in
    // Do something
}

Example of handling a swipe up

view.onSwipeUp { _ in
    // Do something
}

Example of handling a swipe down

view.onSwipeDown { _ in
    // Do something
}

Bar Button Item Example

let barButtonItem = UIBarButtonItem(title: "Save", style: .Plain) { [unowned self] _ in
  self.save()
}

Control Example

slider.on(.ValueChanged) { [unowned self] _ in
  self.volume = self.slider.value
}

Installation

Use CocoaPods

CocoaPods is a dependency manager for Cocoa projects that supports embedded frameworks for Swift.

For instructions on how to install and use CocoaPods checkout the guides.

New CocoaPods Project

To integrate GestureRecognizerClosures into your Xcode project that is not currently using CocoaPods specify it in a new Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'GestureRecognizerClosures', '~> 5'

Then, run the following command:

$ pod install

Existing CocoaPods Project

To integrate GestureRecognizerClosures into your existing CocoaPods Xcode project specify it in your Podfile:

pod 'GestureRecognizerClosures', '~> 5'

Then, run the following command:

$ pod install

Use Carthage

You can use Carthage to install GestureRecognizerClosures by adding it to your Cartfile:

github "marcbaldwin/GestureRecognizerClosures"

Updating

Use CocoaPods

To update to the latest version of GestureRecognizerClosures run the following command:

$ pod update

Change Log

You can view the change log here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].