手势 0.1.0

手势 0.1.0

Serhiy Vysotskiy 维护。



手势 0.1.0

  • Serge Vysotsky

Gestures

Version License Platform

添加识别器

let view = UIView()

view.recognize(.tap) { _ in
    // handle tap
}

view.recognize(.swipe(.left)) { (_) in
    // handle left swipe
}

// Or use target/selector
view.recognize(.edgeScreenPan(.left), target: self, action: #selector(handleEdgePan))

// If you need any additional setup...
view.recognize(.panSetup(minimumNumberOfTouches: 1, maximumNumberOfTouches: 4)) { (_) in
    // ...
}

安装

Gestures 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中即可

pod 'Gestures'

作者

Serge Vysotsky

许可

Gestures 在 MIT 许可下提供。如有更多信息,请参阅 LICENSE 文件。