如何在 Xcode 8 中“更新框架”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40323794/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to "Update Frame" in Xcode 8
提问by David Seek
I have updated to Xcode 8.1. Usually when I've miss-edited a Frame that has Auto Constraints, I've pressed on "Update Frame" to revoke my changes. But this option seemed to be gone since the new Update.
我已经更新到 Xcode 8.1。通常,当我错误编辑了具有自动约束的框架时,我会按下“更新框架”来撤销我的更改。但是自从新的更新以来,这个选项似乎消失了。
How do I update the Frame back to the Auto Constraints value now? Or is the "Update Frame" Option somewhere else now? Help is very appreciated.
我现在如何将 Frame 更新回 Auto Constraints 值?或者“更新框架”选项现在在其他地方吗?非常感谢帮助。
回答by nunezve
In Xcode 8, storyboards have been greatly improved to make what you see on the screen exactly the same as what you would see on the device when you run your app. And even though frames might update as you move things, there's a new handy standalone buttonto the leftmost side of the button you have selected in your question (it looks like a refresh button).
在 Xcode 8 中,故事板得到了极大的改进,使您在屏幕上看到的内容与运行应用程序时在设备上看到的内容完全相同。尽管框架可能会随着您移动内容而更新,但您在问题中选择的按钮的最左侧有一个新的方便的独立按钮(它看起来像一个刷新按钮)。
Theres's a few more options as well:
还有几个选项:
You can use the keyboard shortcut: Cmd+ Opt+ =
You can also look for "Update Frames", by going to the toolbar and selecting
Editor -> Resolve Auto Layout Issues -> Update Frames
.
您可以使用键盘快捷键:Cmd+ Opt+=
您还可以通过转到工具栏并选择 来查找“更新框架”
Editor -> Resolve Auto Layout Issues -> Update Frames
。
回答by Vineet Choudhary
There is a new Update Frames button at the bottom of the canvas. Click the button to update the frames of the selected objects and their children on the Interface Builder canvas.
画布底部有一个新的更新帧按钮。单击该按钮可更新 Interface Builder 画布上所选对象及其子项的框架。
回答by NGG
Near the Stack button, there is a new "Update frame" button, its just left to the stack button (you can see it in your screenshot)
在堆栈按钮附近,有一个新的“更新框架”按钮,它就在堆栈按钮的左侧(您可以在屏幕截图中看到它)