我正在开发一个有一个标签的通用应用程序。当我旋转屏幕时,标签文本对齐方式变得不同。
问问题
216 次
2 回答
1
UILabel
确保为正确设置自动调整大小属性
于 2011-05-09T11:47:41.493 回答
0
- (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;
于 2011-05-09T11:52:34.490 回答