iOS Swift - SwiftUI Basics
You want to create a button that changes its title to "Clicked" when tapped. Which code snippet correctly implements this behavior?
let button = UIButton()
button.setTitle("Tap me", for: .normal)
button.addTarget(self, action: #selector(changeTitle), for: .touchUpInside)
@objc func changeTitle() {
// What goes here?
}