To run the example project, clone the repo, and run pod install
from the Example directory first.
SwiftAction is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SwiftAction'
- addAction
button.addAction(for: .touchDown) {
$0.backgroundColor = .red
}
button.addAction(for: .touchUpInside) {
$0.backgroundColor = .blue
}
button.addAction(for: .touchDragInside, action: buttonDragInside)
- removeAction
deinit {
UIControl.Event.all.forEach {
self.button.removeAction(for: $0)
}
}
O-O-wl, o.o.wl.soft@gmail.com
SwiftAction is available under the MIT license. See the LICENSE file for more info.