Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 342 Bytes

README.md

File metadata and controls

19 lines (16 loc) · 342 Bytes

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...
}