Layout Issues After Updating to Xcode 8

XCode 8 - How to solve an Auto resizing issue on XCode version 8.0?

I asked to Apple about this same issue, and they have sent the following message to my inbox:

Hello Raja,

Engineering has determined that your bug report (28489404) and will be closed.

Xcode 8 - changes in constraints is not taking effect in preview

After some more searching I found that this a bug. This workaround solved https://stackoverflow.com/a/39653512/2238515 my issue. On the other hand is waiting for an update from Apple

Layout Interface Builder constraints issue since Xcode 8

I'm working on a large project with multiple storyboards and lots of viewcontrollers. Had same issues on most of them. And figured it is happening because Xcode now supports constraints with decimal values.

Here is the fix worked for all of my UITableViews and UICollectionViews:

1) Remove only one of the "Height equals: xx" constraint from one of your views inside the cell.

2) Update all frames.

3) Select the view you removed constraint from.

4) Click to add new constraint button. Now it should be showing a new height, probably with a decimal value.

5) Add height constraint without changing the value inside the box.

Your problem should be fixed for that cell now. Repeat this steps for all cells that are broken. Hope this solution works for you as well. Good luck!



Related Topics



Leave a reply



Submit