Use of Transform in IOS development, iostransform

Source: Internet
Author: User

Use of Transform in IOS development, iostransform

Transform is used to change the position, size, or rotation angle of a view object.

Frame: it can also be a position/size.

Bounds: Size

Center: Location

The three most common methods

SomeView. transform = CGAffineTransformMakeRotation (angle) Rotation
-The angle is m_pi m_pi_2 m_pi_4 in radians... Positive is clockwise and negative is counter-clockwise
SomeView. transform = CGAffineTransformMakeTranslation (x, y) shifts x to y (positive and negative control directions)
SomeView. transform = CGAffineTransformMakeScale (x, y) x and y

The preceding parameters are based on the original location.

SomeView. transform = CGAffineTransformTranslation (someView. transform, x, y); translate based on your own transform

The other two are used in a similar way.

 



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.