I am trying to change a button\'s color (just a flash/blink) to green when a scan is correct and red when there\'s a problem. I am able to do this with a view like so
myButton.alpha = 0.7 UIView.animate(withDuration: 0.3, delay: 1.0, options: [UIView.AnimationOptions.curveLinear, UIView.AnimationOptions.repeat, UIView.AnimationOptions.autoreverse], animations: { myButton.alpha = 1.0 }, completion: nil)