iOS method classes: The use of cgaffinetransform is probably

Source: Internet
Author: User

The Cgaffinetransform class in the Coregraphics framework can be used to set the transform properties of the UIView, control the zoom, rotate, and pan operations of the view:

Also known as the radiation transformation matrix, can refer to linear algebra matrix implementation mode 0.0

The Cgaffinetransform official documentation is attached here:

Https://developer.apple.com/library/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html

Generally speaking, this class contains 3 different types, respectively, using the following 3 methods to create a value;

1.CGAffineTransformMakeTranslation (cgfloat tx, cgfloat ty) (pan: Set translation amount)

2.CGAffineTransformMakeScale (cgfloat sx, cgfloat sy) (Scale: Set scale) The effect of the view rushing and indenting the frequency screen is achieved only by setting the zoom scale.

3.CGAffineTransformMakeRotation (cgfloat angle) (rotation: Set rotation angle)

All of the above 3 are for the initial reference of the center point for the original view, and you can restore the set amount after the operation is finished:

view. Transform =cgaffinetransformidentity;

In addition, the existing transform can be further treated by means of cgaffinetransformtranslate and other methods.

iOS method classes: The use of cgaffinetransform is probably

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.