Skip to content

deda9/Clicky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

UIControlTargetWrapper

In short it replaces this

let button = UIButton()
button.addTarget(self, action: #selector(didTapOnButton), for: .touchDown)

@objc private func didTapOnButton() {
     //you code here...
}

with

let button = UIButton()
button.addTarget(for: .touchDown) { _ in
    //you code here...
}

About

Easy syntax to add target to UIControl, UIButton, etc to support onClick event

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages