IOS Development----Cgaffinetransform pan, rotate, zoom

Source: Internet
Author: User

Be sure to remember the three steps when doing panning, rotating, and zooming:

    1. Gets the value (Gets the Transform property value of the current control)

    2. Modify the value (modify the value of the transform property that needs to be set)

    3. Assignment (assigns the value of the modified transform property to the original value)

/** * Pan * * @param transform get the current deformation transform * @param tx pan along the x horizontal direction * @param ty pans along the y vertical direction * * @return Returns the results after the move */cgaffinetransformtranslate (Cgaffinetransform T, cgfloat tx, cgfloat ty)
/** * Zoom * * @param transform get current deformation transform * @param sx Horizontal Scaling * @param sy Vertical Scale * * @ret Urn Scaling result */Cgaffinetransformscale (Cgaffinetransform T, cgfloat SX, CGFloat Sy)
/** * Rotate * * @param transform get the current deformation transform * @param angle Rotation angle * * @return return the rotated results */CGAFFINETRANSFORMR Otate (Cgaffinetransform t, cgfloat angle)
/** * Restore * */cgaffinetransformidentity

With the above settings you can translate, rotate, and zoom the effect of a control


Personal contact Information:

Email: [Email protected]

Mobile: 18813015385

qq:531106716

: zxg0633

Copyright Notice: This article Zhou Yugang Original, welcome reprint share. Please respect the author Labor, reproduced when the statement and the author of the blog link, thank you!







IOS Development----Cgaffinetransform pan, rotate, zoom

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.