📅  最后修改于: 2022-03-11 15:01:02.153000             🧑  作者: Mango
myButton.addTarget(self, action: #selector(myButtonTapped), for: .touchUpInside)
@objc func myButtonTapped() {
print("My button was tapped!")
}