I don’t really understand what this function is good for. Can someone explain that (maybe with some examples)?
Can I rotate an UIImageView object with this one?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
CGAffineTransformMakeRotation is a constructor that creates you a rotation matrix, like CGPointMake, or NSMakePoint. Some functions requires you to pass in a transformation matrix like:
You can use UIGraphicsGetCurrentContext to get a CGContextRef and transform/rotate the context as you like.
UPDATE: You can directly change UIView’s transform. It is a property:
@property(nonatomic) CGAffineTransform transform.
Thanks to Brad for pointing this out.