I need to check when User taps the button to do next actions. How it can be implemented? For example, I have this button:
@IBAction func ButtonSender(_ sender: UIButton) {
}
and I need to know when it is tapped.
I need to check when User taps the button to do next actions. How it can be implemented? For example, I have this button:
@IBAction func ButtonSender(_ sender: UIButton) {
}
and I need to know when it is tapped.
This is very simple
@IBAction func ButtonSender(_ sender: UIButton) {
yourFunction()
print("The button was tapped")
}
Build a variable of type Boolean initialize it with false then after hitting button change its value to true..
@IBAction func ButtonSender(_ sender: UIButton) {
isButtonTapped = true
}