Swift: Selector Syntax Sugar
Andyy Hope

The new Swift 2.2 selectors are awesome, but for the most common cases where code is just targeting a method in self, I much prefer cutting the middle men and using closures.

See here: https://gist.github.com/Moximillian/3646798677c9cd9fd2c3

button.addTarget(.TouchUpInside) { button in
 print(“Button clicked”)

Show your support

Clapping shows how much you appreciated Mox Soini’s story.