CATransition transition Animation

Source: Internet
Author: User

CATransition transition Animation

Animation is essential during mobile development. With animation, it seems that our program has a life. animation can make our program interface changes smoother, rather than abrupt. today, let's talk about the CATransition transition animation. let's take a look at the code implementation of the Transition Animation: [objc] view plaincopyprint? <Span style = "white-space: pre"> </span> // create CATransition * transition = [CATransition animation]; transition. duration = 2; // set the transition style/** Types: kCATransitionFade kCATransitionMoveIn kCATransitionPush kCATransitionReveal * // style transition. type = kCATransitionReveal;/*** Subtypes: kCATransitionFromRight; kCATransitionFromLeft; kCATransitionFromTop; kCATransitionFromBottom; * // transition. subt Ype = kCATransitionFromBottom; // Add an animation [self. changeView. layer addAnimation: transition forKey: nil]; in general, we set the animation type to use the provided enumerated value. by accident, transition animation can also recognize strings in some OC. usage: [objc] view plaincopyprint? Transition. type = @ "rippleEffect"; below are some animation types that can be used: fade // cross fade transition (transition direction not supported) push // The New View pushes the old view out of moveIn // The New View is moved to the old view and reveal // removes the old view, show the following new view cube // cube tumble effect oglFlip // top, bottom, left, and right flip effect suckEffect // contraction effect, such as a piece of cloth being drawn (transition direction not supported) rippleEffect // drip effect (transition direction not supported) pageCurl // page up effect pageUnCurl // page down effect cameraIrisHollowOpen // camera lens opening effect (transition direction not supported) cameraIrisHollowClose // camera lens close effect (transition direction not supported)


What is transition animation?

It is the content of the first and last two key frames of an animation. The intermediate frame is calculated by the computer based on the features and animation nature requirements of the first and last two frames.

What is the role of transition animation frames?

The animation between two key frames (original image) is called a transition frame.
Here we will talk about the animation production process. First we need to draw the original image and then make the original words into an animation.
If the original image is directly spliced by technical means, the effect will be very poor. There will be a so-called card frame. At this time, the transition frame is required for the transition.
Transition frames are mainly placed between two key frames of the animation, which improves the intermediate effect of the animation.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.