SyntaxFix
Write A Post
Hire A Developer
Questions
For Swift 3
Create a function for button action first and then add the function to your button target
func buttonAction(sender: UIButton!) { print("Button tapped") } button.addTarget(self, action: #selector(buttonAction),for: .touchUpInside)