Reputation: 435
click a add button in the same page of the blinking button page to select a name from a new page and back to the blinking button page the blinking button is not blinking and is in a light shade.
self.checkAvalibilityBtn.alpha = 1.0
UIView.animate(withDuration: 0.80, delay: 0.0, options: [.curveEaseIn, .repeat, .autoreverse, .allowUserInteraction], animations: {() -> Void in
self.checkAvalibilityBtn.alpha = 0.2
}, completion: {(finished: Bool) -> Void in
})
Upvotes: 1
Views: 39
Reputation: 1318
You are almost done. Need to reset alpha
to 1 in completion
block -
self.checkAvalibilityBtn.alpha = 1.0
UIView.animate(withDuration: 0.80, delay: 0.0, options: [.curveEaseIn, .repeat, .autoreverse, .allowUserInteraction], animations: {() -> Void in
self.checkAvalibilityBtn.alpha = 0.2
}, completion: {(finished: Bool) -> Void in
self.checkAvalibilityBtn.alpha = 1.0
})
Upvotes: 2