views:

17

answers:

1

I'm making a 2 player game where you play on either side of the iPhone and I need to have upside down buttons. Any ideas on flipping them around?

A: 

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 ); 
Colin Gislason
In dont want to rotate the whole view. Could I replace `view.transform` with my button/label name?
I tried it and it worked.
shorty876: Pay attention to superclasses. Buttons and labels are views just as much as the view your view controller owns directly is.
Peter Hosey