I am surprised I can’t find this answer but for some reason can’t find it for Xcode.
In my app I have an IBAction buttonPressed and it adds coins to my “coins” variable and displays it in a UILabel. I would like to make it so when the user presses the button it does not add the coins or display it in the UILabel for about 30 seconds. Is there a simple way to do this? I’m pretty new, so please explain in simple steps if possible. Thank You 🙂
It’s very easy, just use performSelector:withObject:afterDelay:. You would put it in your IBAction code like this: