Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Layout issues after updating to Xcode 8

Here is a before and after of one of my screens after I upgraded to Xcode 8.
All I did was open up my main.storyboard and from there, I built and ran my app on my phone.
In my version control, I can see Xcode is doing a lot of changes to my main.storyboard just from me opening it.
Whenever I delete those changes, I can see what I use to see in Xcode 7.3.1.
But, as soon as I re-open interface builder with my storyboard, I see those changes come back into place.

Is there something I can do here?

Before Xcode 8

enter image description here

After update to Xcode 8

enter image description here

like image 249
user2726072 Avatar asked Sep 14 '16 18:09

user2726072


People also ask

Why is Main Storyboard not showing up in Xcode?

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.

What is adaptive layout in iOS?

The introduction of Adaptive Layout caused a huge paradigm shift for iOS app designers. By using it, you can now create a single layout for your app which works on all current iOS devices — without crufty, platform-specific code! This tutorial serves as your introduction to Adaptive Layout.

What does constrain to margins mean in Xcode?

The “Constrain to margins” checkbox determines whether constraints to the superview use the superview's margins or its edges. The lower portion of the popover lets you set the item's width or height. The Width and Height constraints default to the current canvas size, though you can type in different values.

What changed in Xcode 13?

Xcode 13 has a lot of quality of life upgrades with its autocompletion improvements, VIM keybindings, column breakpoints, error minimization, and more. It has also received some pretty big additions in the form of Xcode Cloud and the Documentation Compiler (DocC) that are sure to be great additions for many teams.


Video Answer


1 Answers

I had a similar problem with tableview images not appearing once I converted the storyboard file to be Xcode8 compatible. This looks like a bug with Xcode8, so until a bug fix is released, here is a work around:

  1. Open your storyboard in Xcode 8 and choose an initial device view. Make changes as you normally would.
  2. Once you have completed your changes, select the storyboard -> File Inspector -> Opens in -> Select 'Xcode 7.x'.

enter image description here

  1. Select 'Save and Close' when prompted
  2. Your storyboard changes will be saved, and your storyboard will function as it did pre-Xcode8.

When you need to make other changes to the storyboard file, follow these steps again.

like image 92
David T Avatar answered Sep 17 '22 17:09

David T