Re: Collection View Storyboard layout wrong in Xcode 8.x
Re: Collection View Storyboard layout wrong in Xcode 8.x
- Subject: Re: Collection View Storyboard layout wrong in Xcode 8.x
- From: Doug Hill <email@hidden>
- Date: Wed, 28 Sep 2016 12:47:27 -0700
> On Sep 28, 2016, at 9:34 AM, Fritz Anderson <email@hidden> wrote:
>
> [READERS: I’ve addressed only one of the OP’s concerns.]
>
> On 27 Sep 2016, at 5:58 PM, Doug Hill <email@hidden> wrote:
>>
>> • In Xcode 7.x all of my view controllers in my main Storyboard had their views sized to 600 x 600. I then open this storyboard in Xcode 8, and it asks me to pick a size class (e.g. compact width, regular height) to start with. Now all my views in the storyboard have their autolayout constraints broken since everything is still laid out for 600 x 600 but the widths/heights of the views are adjusted to the size class I picked above. There are numerous autolayout warnings that everything is laid out wrong, and I now I appear to need to re-layout ALL my views in the storyboard to correct for these problems.
>
> One interpretation of what you’re saying is that you have lots of yellow triangles. Click the triangle at the top-right corner of a view controller scene in which one appears; you’ll see a list of warnings that this or that view is constrained to certain bounds, and isn’t currently of that size.
>
> Click one of the warning triangles. Xcode should explain, and offer a number of options. Select the first (Update Frames). Check the box that says “Apply to all frames in container”. Click “Fix Misplacement”. That will conform all views to their constraints, clearing those warnings. If you’re lucky, you’ll have cleared all of them.
>
>
> — F
Ok, I went through my entire storyboard and tried to fix all the warnings. I've never used the 'Apply to all views in container' before. That seems to take care of most of the problems. I did see a few views that didn't resize correctly (collection view cells/headers) but I'm cleaning those up now.
I'm still going to have to test every view controller to make sure things are actually fixed. I kinda wished they wouldn't have messed up my storyboard like this.
Also, I found another case where opening a XIB for a view controller wouldn't update the frame correctly for a particular size class and I couldn't resize the view manually (as the width/height input fields are disabled). Not sure what to do about these.
Finally, I had another XIB whereupon opening it displayed the warning that the view was the wrong size and the option to "fix" the size. Choosing to fix it resized the view but to a weird size such that the warning was still there. Doing this a couple of times caused IB to throw an exception and generate an error report.
I guess this is all FYI at this point since there appear to be actual bugs. Off to Radar I go.
Doug
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden