开发者

change labels orientation,programmatically

开发者 https://www.devze.com 2022-12-27 17:43 出处:网络
can we开发者_如何转开发 change the orientation of label,programmatically. i created few labels on landscape mode, but my application works on portrait,

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

精彩评论

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