How do you draw text on a diagonal? In other words, a horizontal UILabel that's rotated, say, 45 degrees?
+1
A:
You can .transform
the label, e.g.
theLabel.transform = CGAffineTransformMakeRotation(M_PI / 4); // pi/4 = 45 degrees.
KennyTM
2010-05-30 13:40:23
+1
A:
// rotate 45 degrees
label.transform = CGAffineTransformMakeRotation(M_PI / 4);
You may want to do this before adding the label to its parent view.
Senseful
2010-05-30 13:41:44
Thanks everyone!
Martin
2010-05-30 15:26:24
+1
A:
You can use a CGAffineTransform to rotate the view.
myLabel.transform = CGAffineTransformMakeRotation((45*M_PI) / 180);
Jasarien
2010-05-30 13:42:06
Posting from an iPad is obviously too slow when writing code is needed. There were no answers when I started posting. Now there are 3 :(
Jasarien
2010-05-30 13:43:14