Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swift: Selector syntax sugar

Objective-C developers be jelly

Medium post

Swift: Selector syntax sugar

tl;dr

Turn this:

let button = UIButton(type: .System)
button.addTarget(self, action: #selector(ViewController.buttonTapped(_:)), forControlEvents: .TouchUpInside)

Into this:

let button = UIButton(type: .System)
button.addTarget(self, action: .buttonTapped, forControlEvents: .TouchUpInside)

About

Swift's Selector use made more sugary

Resources

Stars

57 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages