Xcode 11 storyboards all messed up

I downloaded XCode 11 from the App Store last night and brought up my application which was working fine in XCode 10. Most of my storyboards are all messed up. Please look at this link:


https://www.dropbox.com/s/nw3ehgxg3b44ghd/Screen%20Shot%202019-09-21%20at%206.15.28%20PM.png?dl=0


This is the root controller and it doesn't even have the size of selected device correctly. If I add a new viewcontroller and start designing it works fine. I looked at the XML for the storyboard but can't seem to find any differences.


My constraints are setup to make the image go from edge to edge but it just won't do it. If I change the board to Freeform and change the size of the form to somethig like 1024 x 768 the lines for the controls will appear in the right place but all the controls are still messed up.


Any ideas?

Replies

all the controls are still messed up.

Can you explain ?


Try to close and reopen storyboard.

https://stackoverflow.com/questions/47078316/in-storyboard-my-views-are-messed-up-why-is-that


Note: I did upgrade from XCode 10 to 11 GM2. Storyboards have about 15 views. Everythings stayed in place.

I commited my changes after that mess up then deleted the old proect.

Cloned it again and run it. make sure when you open your project 1st file opened is not storyboard otherwise it will mess up again.

If you want to run your app correctly you must have make those changes and commit it.


Note : If you open storyboard it will mess up again, I'm still finding solution for that.

Wow, it took me a while to figure this one out. I had this issue in two of my slightly older projects which does not stick to the latest standards in terms of auto-layout, etc. All my labels, buttons, views inside a UITableView got all messed up, stretched or misplaced. Everytime I corrected the views, closed and re-opened the storyboard, it was messed up once again. You can fix it like that:


1. Make sure "Use Safe Area Layout Guides" is checked



2. Even if you're not using Auto-Layout in this storyboard, go to your UITableView which contains misplaced views and control-drag from your tableview to the Safe Area (as shown below) and make sure that you do this for Leading/Top/Trailing and Bottom Space.


3. Actually, there is no step 3. That's it. You can now move your views/labels/buttons to the positions that they should be in and save the project.


Hope this helps!