Artem Stepanenko Artem Stepanenko - 1 month ago 75
iOS Question

The issue of Interface Builder in Xcode 8

My storyboards are created in Xcode 7. After I installed Xcode 8, all of them are constantly messed up. When I open one of them, Xcode asks me to select a device (which is a nice new feature). But then it never adjusts views' frames, so I must press "All View: Update Frames" infinite amount of times. And even this doesn't fix all "misplaced" views.

Anybody knows how to fight this problem? Or the only option is to pray that Apple fixes it at some point?

UPDATE 1

It happens every time I open IB, even if I've fixed frames previously.

UPDATE 2

When my colleague fixes same storyboards on his computer, changes stay. No idea what makes my Xcode so special.

Example

Answer

Xcode 8.0 has the bug, that it does not save the rects from the storyboard xml-s. So if you fix misplaced views in Xcode 8.0, the problem is gone for as long as the storyboard stays in RAM. When the storyboard is closed and re-read from a file, the issue appears again. (Actually Xcode 7.0 had exactly the same problem in the beginning.)

Xcode 8.1 beta 3 (the most recent version at the time of this writing) fixes this issue:

  • frames are not 1000x1000, but they stay as they were.