Types of catransition transition animations in iOS development

Source: Internet
Author: User

During the mobile development process, animations are essential and animated as if our program had life. Animations can make our program interface more fluid, not very abrupt. Today, let's talk about the catransition transition animation.

Let's take a look at the code implementation of the Transition animation:

<span style= "White-space:pre" ></span>//create    catransition *transition = [catransition animation];    Transition.duration = 2;    Set transition style    /**        Types:        kcatransitionfade        kcatransitionmovein        kcatransitionpush        Kcatransitionreveal          *    ///style    transition.type = kcatransitionreveal;    /**     *  subtypes:        kcatransitionfromright;        Kcatransitionfromleft;        Kcatransitionfromtop;        Kcatransitionfrombottom;     *    ///direction    transition.subtype = Kcatransitionfrombottom;        Add animation    [Self.changeView.layer addanimation:transition Forkey:nil];

In general, we set the type of animation to use the provided enumeration value. Accidental discovery, transition animations can also recognize strings in OC.

How to use:

Transition.type = @ "Rippleeffect";

Here are some of the types of animations you can use:

fade //Crossfade Transitions (transition direction not supported)
push //New View roll out the old viewMovein //New view above the old view reveal //move the old view away to show the new view belowcube //cube Rollover effect oglflip //Upper and lower left and right rollover effectsuckeffect //shrinkage effect, such as a piece of cloth is pumped away (not support transition direction)rippleeffect //Drip effect (transition direction not supported)pagecurl //Page UP effectpageuncurl //Page DOWN effectCamerairishollowopen//Camera lens open effect (transition direction not supported)camerairishollowclose//Camera lens Close effect (no transition direction is supported)

Types of catransition transition animations in iOS development

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.