[IOS] implements a set of Custom Animation libraries.

Source: Internet
Author: User

Implemented a set of Custom Animation Libraries

Luo chaohui (http://blog.csdn.net/kesalin)

Reprinted please indicate the source

Recently, a set of Custom Animation libraries have been implemented on iOS, which can support automatic animation demonstration of values of any numeric variables and support a variety of animation effects. The effects are still dazzling. For example, if you set an offset variable from 50 to 100, this change can be done in an animation instead of a regular one-step approach. Compared with the animation library that comes with iOS, my custom animation library is more configurable and easier to use. Set indicates the set value of an animation, and update indicates the normal set value of no animation. Currently, the following animation types are supported:


Enum easetype _{

Easetype_none,

Easetype_in,

Easetype_out,

Easetype_inout,

};

Typedef int easetype;

Enum animationtype _{

Animationtype_linear,

Animationtype_bounce,

Animationtype_back,

Animationtype_quartic,

Animationtype_quintic,

Animationtype_circular,

Animationtype_cubic,

Animationtype_quadratic,

Animationtype_sinusoidal,

Animationtype_elastic,

};

Typedef int animationtype;

Example:

        // setup animation        //        propertyValue.duration = duration;        propertyValue.easeType = EaseType_Out;        propertyValue.animationType = AnimationType_Back;        // AnimationType_Elastic        // AnimationType_Back        // AnimationType_Bounce        // start animation        [propertyValue setValue:targetValue];

Rotate the pie graph with the rollback effect:

Rotation menu with bounce effect:

If you are free, sort out the Implementation ideas, write an article in detail, and release the source code.

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.