Animation classes common to iOS

Source: Internet
Author: User

Quartzcore Class Library:

Common classes

Calayer a drawing layer

Caanimation Abstract animation classes, some basic properties, time functions, etc.

Capropertyanimation inherit caanimation or abstract class, abstract some properties such as KeyPath

Cabasicanimation inherits from the Capropertyanimation as the name implies, the basic animation class, can achieve the basis of the animation

Cakeyframeanimation inherited from Capropertyanimation key-pin animation

Catransition inherited from Caanimation encapsulated some of the system's animations, Type,subtype

Caanimationgroup inherited from Caanimation has animations to compose an animation group

Cadisplaylink is similar to Nstimer, triggered by the number of frames, the default system frame number of 60/second, then can be set to trigger every few frames, but when the high CPU occupancy rate of the number of frames hit less than 60 times/second, then will jump frame, some triggers are pass off

Cagradientlayer inherited from the Calayer, is a color gradient layer

Cashapelayer inherits from Calayer, can be underlined, fills the layer

catransaction the layer, begin to animate, Commit

Catransform3d Calayer all have a catransform3d type of Transform properties, the transformation of the x, Y, Z axis of the layer, and opacity,frame and so on, with Catransaction to complete the animation

Coregraphics Class Library:

Cgcontext class, drawing context

Cgcontextref CTX = Uigraphicsgetcurrentcontext (); Gets the current context

Cgcontextadd ..... Create something, such as a rectangle, circle, curve, line, etc.

Cgcontextset ... settings, such as Strokecolor,fillcolor,linewidth,alpha, etc.

Use a line to draw a graphic

Cgcontextbeginpath (CTX);

Cgcontextmovetopoint (point) moves the starting points to one point

Then Cgcontextaddlinetopoint (pont1) crossed

......

After the painting is done Cgcontextclosepath (CTX);

At the end of the painting:

Cgcontextfillpath (CTX); just fill

Cgcontextdrawpath (CTX,kcgpathfillstroke) fill and line are painted, the back of the Emun can be selected or the same effect as above

Cgaffinetransform is a variety of 2D variations, UIView's Transform property is this type

Animation classes common to iOS

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.