Answers for "swift uibutton programmatically set ontap function"

1

swift uibutton programmatically set ontap function

myButton.addTarget(self, action: #selector(myButtonTapped), for: .touchUpInside)
@objc func myButtonTapped() {
    print("My button was tapped!")
}
Posted by: Guest on June-29-2021

Code answers related to "swift uibutton programmatically set ontap function"

Code answers related to "Swift"

Browse Popular Code Answers by Language