Created
April 22, 2016 14:08
-
-
Save wisaruthk/11daf97c2f99a8c14d3841504b376c93 to your computer and use it in GitHub Desktop.
เปลี่ยนสี UIView อย่างง่าย
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func animateView3(view:UIView){ | |
let animation:CABasicAnimation = CABasicAnimation(keyPath: "backgroundColor") | |
animation.fromValue = FlatWhite().CGColor | |
animation.toValue = FlatYellowDark().CGColor | |
animation.duration = 0.5 | |
//animation.autoreverses = true | |
view.layer.addAnimation(animation, forKey: "backgroundColor") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment