Wilson-Micah / Closures

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Closures

Closures is an extension that lets you handle button actions and view gestures similar to a way you would handle a clickListener in Android.

You use it by simply calling:

let button = UIButton()
button.actionHandle(controlEvents: .touchUpInside, identifier: nil) {
    print("Button Tapped!")
}

or for a UIGestureRecognizer

let view = UIView()
view.addGesture(gestureType: .tap, identifier: nil) {
    print("View Tapped!")
}

About


Languages

Language:Swift 100.0%