Skip to content
/ PanSlip Public
forked from k-lpmg/PanSlip

Use PanGesture to dismiss view on UIViewController and UIView

License

Notifications You must be signed in to change notification settings

adboco/PanSlip

 
 

Repository files navigation

PanSlip

Build Status Swift Cocoapods Carthage compatible Platform License

Use PanGesture to dismiss view on UIViewController and UIView.

PanSlip to UIViewController

left to right right to left top to bottom bottom to top

PanSlip to UIView

left to right right to left top to bottom bottom to top

Usage

Enable

// UIViewController
let viewController = UIViewController()
viewController.enablePanSlip(direction: .topToBottom, percentThreshold: 0.2) {
    // TODO completion when UIViewController dismissed
}

// UIView
let view = UIView()
view.enablePanSlip(direction: .topToBottom, percentThreshold: 0.2) {
    // TODO completion when UIView dismissed
}

Disable

// UIViewController
let viewController = UIViewController()
viewController.disablePanSlip()

// UIView
let view = UIView()
view.disablePanSlip()

Installation

CocoaPods (iOS 8+)

platform :ios, '8.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'PanSlip'
end

Carthage (iOS 8+)

github "k-lpmg/PanSlip"

LICENSE

These works are available under the MIT license. See the LICENSE file for more info.

About

Use PanGesture to dismiss view on UIViewController and UIView

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 94.4%
  • Ruby 3.1%
  • Objective-C 2.5%