SWIFT UIBUTTON Secara terprogram mengatur fungsi ONTAP
myButton.addTarget(self, action: #selector(myButtonTapped), for: .touchUpInside)
@objc func myButtonTapped() {
print("My button was tapped!")
}
TheKrisinator