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?
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 .
You can update it by creating a new CGRect and assigning it to the property. CGRect(x:0, y:0, width:100, height:100) is fine. This initialiser is defined in the CGRect extension.
You have SwiftUI enabled in your project, which does not use storyboards anymore. Your layout is inside the ContentView. swift file. If you do want to work the old way, with storyboards, you should uncheck 'Use SwiftUI' in the project creation screen.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With