Here is some code I struggle with for a while.
If you start the fade in animation, the label text fades in. If I start the fade out animation the the label text fades ou
Swift 4 If you need just one pulse when clicking the button, use that:
@IBAction func didPressButton(_ sender: UIButton) {
self.someView.alpha = 0
UIView.animate(withDuration: 0.4,
delay: 0,
options: [.curveEaseInOut, .autoreverse],
animations: {
self.someView.alpha = 1
},
completion: { _ in
self.someView.alpha = 0
})
}