Cocoa Touch - Upsidedown Buttons and Text
I'm making a 2 player game where you play on either s开发者_运维技巧ide of the iPhone and I need to have upside down buttons. Any ideas on flipping them around?
One way is to set the transform
property of UIView
. You can do many types of transforms, but a rotation of 180 degrees will flip it for you.
// angle is radians, so convert degrees to radians
float degrees = 180.0;
view.transform = CGAffineTransformMakeRotation( degrees / 180.0 * M_PI );
精彩评论