how to make any view (let’s say a UIButton) to look upside down using transformations in Quartz ? I’ve tried button1.transform = CGAffineTransformMakeRotation(M_PI); with many other values (other than M_PI) but nothing worked correctly.
how to make any view (let’s say a UIButton ) to look upside down
Share
CGAffineTransformMakeRotation(M_PI);rotates the image anchoring the top left corner. If you wish to anchor the center, you will need to move theUIButtonbefore or after the transform.Your comments read like you want to reverse and rotate the image.