【问题标题】:UIlabel text alignment for ipad and iphone用于 ipad 和 iphone 的 UIlabel 文本对齐
【发布时间】:2013-08-01 11:56:14
【问题描述】:

我正在开发一个有一个标签的通用应用程序。当我旋转屏幕时,标签文本对齐方式变得不同。

【问题讨论】:

  • 您能发布更多信息吗?截图之类的?它们有何不同?你手头有代码吗?
  • Axel 我无法发布碎石镜头和代码

标签: ios uilabel universal


【解决方案1】:

确保正确设置UILabel 的自动调整大小属性

【讨论】:

    【解决方案2】:
    - (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;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-06-29
      • 2014-07-24
      • 2012-09-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-13
      • 2011-08-09
      相关资源
      最近更新 更多