func fadeButton(button:UIButton){
UIView.animateWithDuration(3.0, delay: 0.0, options: UIViewAnimationOptions.CurveEaseOut, animations: {
button.alpha = 0.3
}, completion: {
(finished: Bool) -> Void in
// Fade in
UIView.animateWithDuration(1.0, delay: 0.0, options: UIViewAnimationOptions.CurveEaseIn, animations: {
button.alpha = 1.0
}, completion: nil)
})
}
No comments:
Post a Comment