开发者

Cocoa Touch - Upsidedown Buttons and Text

开发者 https://www.devze.com 2023-01-10 04:19 出处:网络
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 propert

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

精彩评论

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