Xcode 8.1 - How to Update Frames for All Views in a Storyboard?

我只是一个虾纸丫 提交于 2019-12-10 02:24:50

问题


In Xcode 8.1, I can update for each view in the storyboard by clicking on the "Update Frames" button. But I want to update all views, how I can do that?


回答1:


It seems to update the frames hierarchically. If you select the main view or even the view controller and press the button, it will update frames for all child views.




回答2:


They added one standalone button to the leftmost side in the constraints controls (it looks like a refresh button). And you can also look for "Update Frames", from the toolbar and selecting Editor -> Resolve Auto Layout Issues -> Update Frames if you want you can select "Apply to all views in container" as before.. for you reference attaching screenshots.

Update frames example video




回答3:


If I understand you right you update frames when you have warnings about misplaced views. In this case, you can simply check the "Apply for all views in container" checkbox at the bottom of popup (which appears when you try to solve your warnings in the Document Outline) before pressing "Update Frames"



来源:https://stackoverflow.com/questions/40320043/xcode-8-1-how-to-update-frames-for-all-views-in-a-storyboard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!