0

首先,我想说请不要给我指向http://www.raywenderlich.com/33150/how-to-update-your-apps-for-the-4-inch-iphone-5的教程链接-展示

因为他使用的是没有用的故事板,因为我使用的是 .xib 文件。

此外,每个人都给我的这个教程也不能帮助我解决我的问题: http ://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2

我只是写这个,因为每次我发布这个问题时,每个人都没有正确阅读它,只是给了我上面的两个链接。所以以下是我的问题:我已将我的 .xib 项目设为自动布局项目,当我从 3.5 英寸屏幕切换到 4.0 英寸屏幕时,它工作得非常好。但是,当我实际运行应用程序时,它不起作用。如果您可以通过在 xcode 中打开项目来提供帮助,这里是项目文件夹的链接:https ://drive.google.com/folderview?id=0B0XkO0WuCozjd0lPcGUzNGpfY0E&usp=sharing

这是问题的图片: 在此处输入图像描述

4

2 回答 2

2

在 xib 选择视图中,然后选择 identify andType 并取消选择 Use Autolayout like this 在此处输入图像描述

于 2013-05-29T04:50:21.263 回答
0

单击实用程序,然后单击文件检查器 .... 然后取消选中Use AutoLayout。然后检查您的 xib 大小。如果是 iPhone4 尺寸,那么在

 -(void)viewDidLoad

    {
        appDelegate = (AppDelegate*) [UIApplication sharedApplication].delegate;

        if (appDelegate.window.bounds.size.height > 548)/// this is for iphone5

        {
          // Again set the position of all the acc to iPhone 5

         }
        else

          {
           // it will work for iphone 4
          }
     }
于 2013-05-29T04:02:00.030 回答