-3

我正在开发一个 iPhone 应用程序,我有几组从 XML 提要中获取数据的标签。然而,最初我为 iPhone 5(屏幕更大)设计了该应用程序,当我将其更改为 3.5 英寸视网膜时,如照片所示,标签发生了位移。

iPhone 5 4.0 英寸标签 http://i.stack.imgur.com/d4LXp.png

iPhone 4 3.5 英寸标签 http://i.stack.imgur.com/OPNpn.png

因此,当单击 3.5 英寸设计的切换按钮然后对其进行编辑时,4 英寸视网膜设计将被取代。有谁知道我可以如何克服这个问题?谢谢。我显然正在使用情节提要来编辑文件。

4

1 回答 1

3

Mikkel, it depends if you are using Autolayout or not. To check if it's enabled, go to the File Inspector (Command+Alt+1) and see if the checkbox Use Autolayout is on or off).

If you are not using Autolayout: you will need to configure the AutoResizing Masks. In order to do so, go to the Size Inspector (Command+Alt+5). Then, for each label, you set the left margin and the top margin as fixed (the red line, not the arrow).

If you are using Autolayout: in the same size inspector, configure correctly the constraints to left and top as fixed, and it should be fine.

于 2013-08-15T11:24:23.743 回答