I wanted to add sound and animation to button, but, it doesn't work, for example :
@IBAction func retry(sender: AnyObject)
{
buttonBeep?.play()
sender.setImage(UIImage(named: "retryTwo.png")!, forState: .Highlighted)
self.viewDidLoad()
}
My question is why it automatically jumps to viewDidLoad
and does not comply first two line? and how can I fix it?