How can you rotate text for UIButton and UILabel in Objective-C?

jdl picture jdl · Jun 13, 2011 · Viewed 44.6k times · Source

How can you rotate text for UIButton and UILabel? 90 degrees, 180 degrees.

Answer

Gypsa picture Gypsa · Jun 13, 2011
[*yourlabelname* setTransform:CGAffineTransformMakeRotation(-M_PI / 2)];

rotated image enter image description here

pervious image enter image description here