Xcode 8 GM seed Storyboard layout issue
Asked Answered
C

5

16

I've tried XCode 8 GM seed and I've found out a serious issue in the Storyboard, either you use Auto Layout or disable it, Xcode 8 messes up with a UIView included into a UIScrollView, as shown here:

enter image description here

enter image description here

The wired thing is that if I resize that embedded UIView into the ScrollView, quit Xcode and open my project again, that UIView gets bigger again, with no sense, all the times.

Have you encountered the same issue?

Do you think Apple fix this big bug with the Official release of XCode 8?

Thanks!

UPDATE Unfortunately even the official version of Xcode 8 has the same issue :(

Cislunar answered 8/9, 2016 at 15:1 Comment(6)
I have same issue, You need ajust and resize all views... 375points width for iPhone 6.Husbandman
i've made it by code, in a simpler way, by declaring my UIView as an IBOutlet and placing myView.frame = view.frame into viewDidLoad(), and that makes my app working fine on all devices... but the Storyboard still gets messed up and that's not good at all, because when i open the Xcode project again all my views are moved and resized, so if I have to update something manually in the Storyboard it's just a mess :( anyway I shouldn't even do that, everything works perfectly on Xcode 7.3Cislunar
btw, do you mean that I should keep the controllers in the Storyboard as iPhone 6 instead of iPhone 4s?Cislunar
I encountered the same issue with Xcode 8 GM. I really hope they fix this issue by the time they do the final, final release. At first, I thought it was an issue with Xcode 8 migrating over from Xcode 7 but then after some testing, I notice that wasn't the case. I created a new Storyboard with Xcode 8 and after reopening with Xcode 8, I was getting the same issues you just described. I submitted a DTS and two bugs. You should do the same to get more attention to this issue with Xcode 8. At least a bug. Will let you know if I get a response from Apple this week.Itinerate
we already filed a bug report to apple, hopefully they'll keep it in consideration since this is not a minor bug.Cislunar
I just updated to xcode8 and am now hurting really bad because of this issue. Is there any way to revert to xcode7.3?Tjon
C
-3

EDIT: Finally Apple fixed this issue with Xcode 8.2.1, good job Apple devs :)

Cislunar answered 5/10, 2016 at 5:19 Comment(4)
why u unaccepted my answer, it was u who accepted, bcoz it worked for u as well others, it s not under policy of stackoverflowSverdlovsk
because that doesn't fix the bug on xcode 8, it's still there for who doesn't want to use Autolayout, Apple must fix it, we can'tCislunar
are you sure apple fixed this issue ?Devy
as far as we saw in Xcode 8.1, yes, we can now position views inside a scrollview and they won't get messed up when we reopen the project without AutolayoutCislunar
S
10

if you are using Auto Layout then, Please Select one by one UIViewController Scene in Main Storyboard. Click Update Frame, it will automatically adjust all frames of a selected view controller.

enter image description here

Sverdlovsk answered 14/9, 2016 at 16:55 Comment(6)
can't get it, I've selected all view controllers, but Update Frames is disabled, I'v selected one viewController, still disabled. How do i selected the whole scene you mentioned?Cislunar
@fvimagination see updated one in my answer. select individual view controller scene one by one not whole main storyboard. it will workSverdlovsk
Ok, I've got it, I had to check "Use Auto Layout", then add all constraints and adjust them as I wish. thanks!Cislunar
@Imran We have to forcefully use AutoLayout? See My que https://mcmap.net/q/458138/-autoresizing-issue-in-xcode-8/3463712Dirndl
@Dirndl r u using size classesSverdlovsk
@Imran No I'm not using size classes.Dirndl
M
0

The only workaround I've found for this is to make the view controllers size "fixed" using the Size Inspector.

Messapian answered 14/9, 2016 at 19:46 Comment(1)
Our controllers have Simulated Size: Fixed, same result, even on the official version of Xcode :(Cislunar
D
0

You can change Simulated size of view controller from size inspector. Go to size inspector and change simulated size to Free form. You can set width and height of view as you like. To view the screen as it was in iOS 9, change width and height to 600. enter image description here

Deming answered 7/10, 2016 at 11:7 Comment(1)
ok, but that's not a proper answer, the bug is still there, when you reopen the project you see that the view inside the scrollview gets bigger, it doesn't keep the width/height values you put in thereCislunar
T
0

If you are compiling your build for iOS 9.3 or earlier versions then you can just change the builds for option to 9.3x.

Change builds for to 9.3:-

enter image description here

Treaty answered 2/12, 2016 at 9:45 Comment(1)
ok, but Apple fixed this issue on Xcode 8.1, so you don't need to even do that :)Cislunar
C
-3

EDIT: Finally Apple fixed this issue with Xcode 8.2.1, good job Apple devs :)

Cislunar answered 5/10, 2016 at 5:19 Comment(4)
why u unaccepted my answer, it was u who accepted, bcoz it worked for u as well others, it s not under policy of stackoverflowSverdlovsk
because that doesn't fix the bug on xcode 8, it's still there for who doesn't want to use Autolayout, Apple must fix it, we can'tCislunar
are you sure apple fixed this issue ?Devy
as far as we saw in Xcode 8.1, yes, we can now position views inside a scrollview and they won't get messed up when we reopen the project without AutolayoutCislunar

© 2022 - 2024 — McMap. All rights reserved.