Created
June 10, 2016 04:35
-
-
Save bricklife/7fd16a5e28c6567686394fff8b85cc6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIControl { | |
var rac_tap: SignalProducer<Void, NoError> { | |
return rac_signalForControlEvents(.TouchUpInside) | |
.toSignalProducer() | |
.map { _ in () } | |
.flatMapError { _ in SignalProducer.empty } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment