iOS Swift - SwiftUI Basics
Given the code below, what happens when the button is tapped?
let button = UIButton()
button.addTarget(self, action: #selector(showMessage), for: .touchUpInside)
@objc func showMessage() {
print("Button was tapped")
}