2

Possible Duplicate:
Objective C: How can you rotate text for UIButton and UILabel?

I am trying to rotate a IOS textlabel 180 degrees. When I try rotating the label with:

[timeField layer].transform = CATransform3DMakeRotation(M_PI, 1.0, 0.0, 0.0);

All the separate characters are rotated individually, so the resulting text is mirrored. How can I rotate the whole label, without the mirrored order of the characters? When I do an animation, the rotation is OK.

Community
  • 1
  • 1
KaasCoder
  • 251
  • 5
  • 14

1 Answers1

10

You have to rotate the label with the property transform, something like:

timeField.transform = CGAffineTransformMakeRotation (3.14/2);

Hope this helps

oriolpons
  • 1,883
  • 12
  • 20