我有一个项目正在从 Xcode 4.6.3 升级到 Xcode 6.1.1。我在 Xcode 6.1.1 中打开它,并打开每个 .xib。每个 .xib 的格式按预期更改。我想尝试使用自动布局。选中“使用自动布局”和“使用尺寸类别”。我将每个适当的对象从对齐框架更改为对齐矩形。
For a while I couldn’t add any constraints. Then after some trying I could add a few. See the screenshot.
For the selected View, I cannot add a constraint. The Add New Constraints checkboxes and fields are disabled. Only Update Frames is available to be changed. I can’t add an alignment constraint either. Ctrl-drag a line off the view does not add a constraint either. Notice the View height of 411. If I select another object, then select the View again the height will change to be the height of the parent tab bar less. If I keep doing that the height gets smaller and smaller, then Xcode crashes. How can I add a constraint to this view?
选项卡栏 X、Y、宽度和高度被禁用。当我更改分配的视图控制器视图的高度时,选项卡栏 Y 会更改为该值减去选项卡栏高度 49。当我选择视图时,它的高度现在又减少了 49。选择选项卡栏,Y 现在少了 49。等等。当我无法添加约束时,如何设置分配的视图控制器视图的尺寸?
我遇到过同样的问题。就我而言,视图布局设置设置为Translate Mask Into Constraint
。我通过将其更改为来解决它Automatic
in Size Inspector
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)