Shishir.bobby
Shishir.bobby

Reputation: 10984

change labels orientation,programmatically

can we change the orientation of label,programmatically.

i created few labels on landscape mode, but my application works on portrait, so wen i start my app, the labels still comes according to landscape mode only,

i cant change the orientation of labels through,IB,i hv some restrictions.

so,only option left is, doing it programmatically...and i dont knw how to do it.

quick help is always appreciated

regards shishir

Upvotes: 0

Views: 316

Answers (1)

cybergen
cybergen

Reputation: 3157

You can rotate the desired labels by applying view.transform = CGAfineTransformMakeRotation(degrees * 180 / M_PI());.

You can even do this in an animation block, if you want it animated. [UIView animateWithDuration:.3 animations:^{ view.transform = CGAfineTransformMakeRotation(degrees * 180 / M_PI()); }];

Upvotes: 2

Related Questions