xCode 8 and 8.1 story boards and constraints.

I've spent the last 6 day in xCode 8 trying to layout storyboards and for 6 days have had issues with constraint and the storyboard preview not displaying anythng correctly. Constraint errors up the wazoo. I have also read through the forums here and on stack overflow and noticed a lot of folks having the same problems I have had. So just for the heck of it I downloaded the xCode 8.1 beta and it looks like some of the issues have been fixed. So, for all those who have posted issues here you should do yourself a favor and check out 8.1. I found it to be somewhat of a steep learning curve but once I figured it out and started using 8.1 my layouts have been working, have had no errors, the preview in the assistant editor and storyboard all display the views properly for all device variations. 6 days in xcode 8 and no luck, 1 hour in 8.1 and Im happy again. I did have to change my approach on a few things though.


Good luck.

Replies

Great news! Thanks for posting. Will try 8.1 beta asap.

Using Xcode 8.1 Beta from first day and don't solve all storyboard problems.

It's still not perfect and it still has some bugs. The one problem I'm still having with it is with the constraints on maps. I can set constraints on map views and everything works but when I save the project and reopen it the maps get resized too 1000 x 1000. It can easily be fixed but I shouldnt have to fix them each time I reopen the project. Othen than that I havn't had any problems. I've heard others complain about this problem as well and I think it affects more than just map views.


In xCode 7 if I have something like map views that I want to occupy the entire screen I could just pin it to top, bottom, left and right, but that doesn't seem to work in xCode 8.1. Now I have to pin it to the top, bottom, left and right as well as align it in the center both horizontaly and vertically which seems to solve that paticular problem.


I find it hard to believe that Apple would release xCode with so many bugs. I've spent 6 days trying to figure this stuff out and wondering If I still just dont know what I'm doing.

You're lucky. 8.1 completely broke all my constraints. It made 239 changes to my storyboard. Trying to rollback to 8.0.

Just curious, but are you using source control? Should make it easy to check-out an 'older' version of your code that pre-dates your use of Xcode 8.1

XCode 8.1 is a nightmare. Worst XCode release since I started with the very first iOS SDK.


I was using XCode8 and some users updated to iOS10.1.1 so I had to update to XCode8.1 (that was a challenge in itself for some reason) so I could fix the issue. The issue was that autolayout of items was totally screwed up in 10.1.1 where it worked with iOS 10.0. I managed to fix the issue by opening each .XIB and storyboard in IB and setting the "View As" layout params (orientation and device). This fixed the problem for that app.


I then return to an in-development app that was working fine with XCode8.0 and low and behold that's broken too.

In this app I'm adding a widget (Today Extension).

XCode will not allow even a simple autolayout example.

I have the ViewController set as FreeForm 320 x 37.

But when it build it insists the viewcontroller superview is 359 x 320 size - not the size of a widget.

I want my views constraints to be based upon the widht and height of the superview so it varies with device size but XCode8.1 cannot do this where XCode8.0 worked fine. I have to set my views to fixed sizes to get something remotely acceptable. It's also impossible to have any contraints based upon top and bottom guides partly due to the ViewController reporting an incorrect height.


I'm going to have to roll back to 8.0 but when I do I wonder if the project that has been updated in XCode8.1 will work - it might not.


I'm extremely disappointed in Apple as both a user and a shareholder this is very shoddy.

an update:


In order to get the project working I had to not only roll back XCode to 8.0 but also had to roll back the project itself (using Time Machine!) to revert the project back to a state that works correctly. I will not be updating XCode to 8.1 again in a hurry!

I NEVER use the latest Xcode on my production apps, i create a sandbox. i'm always using the last version until the next Xcode get to #.2 or 3 and then I scrape stackoverflow to see how many are complaining about what.


in xcode 8 setting there is a switch that supposedly keeps compatability with Xcode7 and throws out incompatabilities.

U