Be sure to remember the three steps when doing panning, rotating, and zooming:
-
Gets the value (Gets the Transform property value of the current control)
-
Modify the value (modify the value of the transform property that needs to be set)
-
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