I am working on a simple quiz game and i want to add some little delays to the game,now when i select the answer the game goes instantly to the next answer now i want to change the color of the button for 0.1 seconds and then loads the next question
I tried the sleep function but it adds only the delay without the color change and i can't choose time intervals smaller than a second because it accepts integers as value
here is the code
sender.backgroundColor = UIColor.greenColor()
sleep(1)
sender.backgroundColor = UIColor.whiteColor()
what i have to put instead of sleep to obtain what i want?
thanks