CGAffineTransform does not rotate subview - MKAnnotationView, CGAffineTransformMakeRotation

Posted by ZeroDiv on Stack Overflow See other posts from Stack Overflow or by ZeroDiv
Published on 2010-04-12T04:49:38Z Indexed on 2010/04/12 4:53 UTC
Read the original article Hit count: 701

I have a view that does 1 simple thing: draws an image. I can rotate the image like this:

CGAffineTransform transform = CGAffineTransformMakeRotation((CGFloat)radians); self.transform = transform; // WORKS: DRAWS, ROTATES

But if I delegate the image-drawing function to a subview, and apply the rotation transform to the subview:

CGAffineTransform transform = CGAffineTransformMakeRotation((CGFloat)radians); self.imageView.transform = transform; // DOESN'T WORK: DRAWS, BUT NO ROTATE

I get the image drawn, but no rotation. Why?

FWIW the "self" view is an MKAnnotationView.

© Stack Overflow or respective owner

Related posts about mkannotationview

Related posts about rotate