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()); }];
精彩评论