开发者

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


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()); }];

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜