【发布时间】:2013-08-01 11:56:14
【问题描述】:
我正在开发一个有一个标签的通用应用程序。当我旋转屏幕时,标签文本对齐方式变得不同。
【问题讨论】:
-
您能发布更多信息吗?截图之类的?它们有何不同?你手头有代码吗?
-
Axel 我无法发布碎石镜头和代码
我正在开发一个有一个标签的通用应用程序。当我旋转屏幕时,标签文本对齐方式变得不同。
【问题讨论】:
确保正确设置UILabel 的自动调整大小属性
【讨论】:
- (void) handleRotations:(UIRotationGestureRecognizer *)paramSender{
if (self.helloWorldLabel == nil){
}
return;
/* Take the previous rotation and add the current rotation to it */
self.helloWorldLabel.transform = CGAffineTransformMakeRotation(self.rotationAngleInRadians +
paramSender.rotation);
/* At the end of the rotation, keep the angle for later use */ if (paramSender.state == UIGestureRecognizerStateEnded){
}
self.rotationAngleInRadians += paramSender.rotation;
【讨论】: