#selector() and the responder chain
With the new syntax for selectors in Swift 2.2 the approach I used in “Utilize the responder chain for target action” produces a warning. Let’s fix that.
Protocols for president
First we add a protocol:
Then we can add an extension to
described in this awesome
by Andyy Hope that looks like this:
Adding the action to the responder chain is then as easy as this:
Then some responder object in the responder chain needs to conform to
You can find the code on github.