Hi I am not sure how to do auto call a click-function for an @IBAction in Swift.
Say, I have a timer function, when countdown is finished, I need to call the Click-function @IBAction as below programmatically instead of asking user to click the button
How to do it in swift?
@IBAction func DoSomeTask(sender: UIButton) { - code-- }
sender: UIButton
tosender: UIButton!
and callDoSomeTask(nil)
from where ever you want. – sbarowUIButton!
orUIButton?
(optional) to be able to pass innil
as the sender if you don't want to pass in the button. – Jesper