Core Animation is a technology that allows developers to produce smooth animated user interfaces. Core Animation gives animation to the view layers. Core Animation unloads a lot of the complexity in generating animated UI elements by providing an additional layer of abstraction between the programmer and underlying software/hardware interfaces.
Animations are created by defining key steps along a path, describing how the layers of text and images will interact. Core Animation processes the definitions at runtime, smoothly moving the visual elements from one step to the next, filling in the interim [Pause between event] frames of animation automatically. iPhone/iPad Developer need to import Quartz Core framework in oreder to apply core animation in application. Classes CATransition, CAAnimationGroup, CABasicAnimation and CALayer etc are avialable for different animations in iphone/iPad application. Find the example below,
CABasicAnimation *basicAnimation = [CABasicAnimation animationWithKeyPath:@”opacity”];
[layer addAnimation: basicAnimation forKey:@”opacityAnimation”];
Core Animation sits between the programmer accessible elements of basic Cocoa animations and the underlying graphics hardware powered by OpenGL. It serves as part of the graphics unification layer which previously included QuickTime, Core Image and Quartz. Core Animation introduces a new concept to AppKit based views called “Layers.”. Main aspects of Core Animation are Animation and Layering.
• Core Animation introduces a new type of proxy in communicating information about visual changes in state. This object is called the “animator” and each subclass of NSObject has one.
• Core Animation can animate a property (e.g. position, opacity, orientation) in time.
• It performs this animation on a dedicated thread, so the animation goes on even if the hardware can’t keep up — Core Animation will simply drop frames to make sure that the animation finishes on time.
• Layers are a bit like Cocoa views, but they exist in three-dimensional space.
• They are rectangular, and can hold assorted content, such as OpenGL renderings, QuickTime movies, images, and text.
• Each layer can hold different content, and can be superimposed, meaning you can effectively combine different types of content in a single view.
• For example, you could place some controls on top of a playing QuickTime movie, or have an 2D image appear next to an OpenGL rendering.
• Core Animation is not a 3D engine, and in that sense it should probably be called 2.5D.
• Layers do have a position along the Z axis, which comes out of the screen, but if two layers intersect, Core Animation will not do the math to make sure things look ‘right’. Better not to let layers intersect.
• Another thing to remember is that layers are not polygons.
• In OpenGL, it is easy to build up an arbitrary surface out of polygonal pieces, but layers are rectangular, and cannot represent arbitrary surfaces. Layers provide a 2D canvas that moves in a 3D space, and are not appropriate for representing true 3D objects. For that you need OpenGL.