Animation is very important in iOS applications, it can improve user experience of our app, make apps looks cool and beautiful. In iOS SDK there are two classes, CABasciAnimation and CAKeyframeAnimation, which can help us do beautiful and complicated animations in not complicated ways. This article I will summarize my current understanding of these two classes, and as work goes on, I will update this article to cover more aspects of these two classes.
Many properties of UIView and CALayer is animatable, which means when you change the value of these properties, some kind of animation will automatically be triggered. For example, if you change the position of a CALayer object, you can see the layer moves from the original position to current position. So for simple animations, such as fade, slide, scale you can just change the respective property of the layer, then the animation will occur. When we want to do more complicated animations, we shoule turn to CABasicAnimation and CAKeyframeAnimation.