开发者

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 ); 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜