当我更改布局约束时

当我更改布局约束时

本文介绍了故事板:当我更改布局约束时,如何让Xcode自动更新帧?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我已经看过WWDC 2014视频(Interface Builder中的新功能),其中演示者使用Storyboard并在表视图控制器中更改表视图单元原型的高度(大约7m30s)。我看到该单元格的所有子视图都在调整单元格上的高度句柄时调整大小。这很好,因为现在您可以非常快速地看到布局约束在不同场景中的表现。

I have seen a WWDC 2014 video (What's new in Interface Builder) where the presenter uses Storyboard and changes the height of a table view cell prototype within a table view controller (at around 7m30s). I see all the subviews of that cell resize as he drags the height-handle on the cell. This is great, because now you can see how your layout constraints behave in different scenarios very quickly.

他没有解释他是如何做到的。因为当我拖动表格视图单元格原型的高度句柄时,我所有子视图的框架都不会更新。它们仅在我从菜单中选择时更新:编辑器>解决自动布局问题>更新帧(表视图控制器中的所有视图)

He doesn't explain how he does it. Because when I drag the height-handle of a table view cell prototype, the frames of all my subviews don't update. They only update when I select from the menu: Editor > Resolve Auto Layout Issues > Update Frames (All Views in Table View Controller)

是否有切换的Xcode设置实时更新我在Storyboard中看到的视图框架,遵守布局约束?

Is there an Xcode setting anywhere that toggles live-updating the view frames I see in Storyboard, obeying the layout constraints?

推荐答案

理论上,你应该能够转向在调整大小行为弹出菜单中的后代(故事板编辑器的右下角)。

In theory, you should be able to turn on "Descendants" in the "Resizing Behavior" popup menu (lower-right corner of the storyboard editor).

在实践中,它在您的情况下已经破裂。我也有同样的问题。您可以在上报告错误。

In practice, it's broken in your case. I have the same problem. You can report the bug at http://bugreport.apple.com/.

可能它在优胜美地的效果更好。我还在跑小牛队。

Possibly it works better in Yosemite. I'm still running Mavericks.

这篇关于故事板:当我更改布局约束时,如何让Xcode自动更新帧?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 20:34