Interface Builder,IOS 6上的帧更改 [英] Interface Builder, frame changes on IOS 6
问题描述
我有一个支持IOS 6和7的xib文件。
I have a xib file that support IOS 6 and 7.
问题是当我选择查看 IOS 6时IOS 7改变,反之亦然。
这是截图,预览IOS 6.1。
The problem is when i selected view as IOS 6 the frame from IOS 7 change, and vice versa. Here is a screenshot, previewing the IOS 6.1.
我将帧调整为(0,-3,255,85)并在调整帧时使用查看为 IOS 7框架变为:
(-345,894,0,0)。
当我使用视图 IOS 6.1调整帧时,IOS 7的帧更改为早期。
I adjust the frame to (0, -3, 255, 85) and when adjust the frame using view as IOS 7 the frame becomes: (-345,894,0,0). When i adjust the frame using view as IOS 6.1 and early the frame changes for IOS 7.
我只是想使用IOS版本中的相同框架。
I just want to use the same frame in both IOS version.
可能相关的一些信息:
现有项目是否已构建对于IOS 5.1及更高版本,然后我更新项目以支持IOS 7.
当我进行更新时,一些视图(包括此视图)将其框架更改为没有任何意义的大小并将其大小设置为大小( 0,0)。
Was an existing project build for IOS 5.1 and later, then i update the project to support IOS 7. When i made the update some views (include this one) have their frame changed to positions that does not make any sense and size their size set (0,0).
首先我认为是界面构建器问题预览问题,但我在具有IOS 6和7的设备上进行了测试,结果与预览相同
First i think was an interface builder issue preview issue, but i tested on devices with IOS 6 and 7 and the results are the same from the preview
先谢谢!
推荐答案
当你指定底部保证金&自动缩放选项卡中的上边距,iOS 7变得困惑&产生奇怪的效果。
When you assign bottom margin & top margin in Autoresizing tab, iOS 7 gets confused & produces strange effects.
我遇到了同样的问题,&我用高度伸展解决了它。参考图片。
I faced the same problem, & i solved it using height stretch. Refer image.
这篇关于Interface Builder,IOS 6上的帧更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!