XCode8: UIStoryboard update to latest layout - ios

I need to migrate an old project to latest ios sdk. I'm facing an issue regarding storyboard. The project was last modified in iOS6 era. When I open its Storyboard with xCode8 it still renders in iOS6 design. Also it was build using Spring and Struts. You can see this in following picture.
The coordinate system also malfunctioning as selection shows y-axis shifted by 20 or 64 downwards(Based on visibility of statusbar and navigationbar). You can see it following.
I've tried turning on/off autolayout and trait collection but nothing worked. Can anyone give me an idea on what needs to be done here. It's a large storyboard and at this point it's not possible to build it from scratch.
PS: If I make a new Storyboard in the same project then it renders perfectly and no such issue arises.

I don't know what caused this issue but I finally fixed it by comparing existing storyboard with a new one. In source code of existing UIStoryboard there was a field variant(variant="6xAndEarlier") which was causing this issue. I removed it and now It works fine.

Related

storyboard refresh issue Xcode

I have an issue of storyboard refresh all views, when I change constraints it cannot be change in storyboard but change in simulator and device.
But when I reopen my project then it refresh.I tried below step but nothing happened
Select storyboard->editor-> refresh all views
and also automatically refresh already checked.
Is this bug of Xcode 9.3?
Here I attach image:-
but in simulator look like perfect below image:-
Thanks you.
I have also gone through this strange issue. I believe it creates if your project becomes so much heavy and lot of storyboards used. Therefore using Xib instead of Storyboard is the good option.
If you restart xcode and reopen your project then you can see your view as expected with updated constraint.
I got the answer it's happened due to IBDesignable in my custom library class.If I remove all IBDesignable it's work fine.
Thank you.

How to resolve Autolayout issues after updating to Xcode 8.1

I have designed user interface in storyboard in Xcode 7 its working fine when i updated Xcode 8.1 and opened the storyboard the result is below.
I don't know what apple actually doing with this, When ever new update came i struggling on this kind of issue. Can some one guide me how to resolve this?
Thanks
Click on the red button that shows the problems, and see what's wrong, and fix them. Very often you just fix the frames of your views. And then you tap on the various device sizes and check if your layout works with every size.
They did make changes with new xcode 8.0, but I believe its easier then ever.
The concept is same behind only few changes.
Like before you need to do update frames, but now they make it easy so you can view a live preview of your layout without going into preview in show assistant editor.
Just click on device button and it automatically updates frames and shows you your layout.
For more information see: A Beginner’s Guide to Auto Layout with Xcode 8

Solid blue rectangle on XCode Tab Bar View Controllers that won't go away?

I recently looked at my app's main.storyboard and realized that there is a big, blue, rectangular box covering half of some of my viewcontrollers (image is pasted here). Only the UIViewControllers connected to the UITabBarController are affected. I did not even realize that this had happened, despite having moved to xCode7 a while ago. It is a bit annoying since dropping any UI element into the view controller causes that element to 'go behind' this blue region and so I can't see them. It is not that the default color is set to blue or anything; it is not a clickable object to even set display parameters to. Anybody have any ideas how to fix this... or even what it is?
Edit: This is not a problem singular to this particular XCode project. Any new project I create and insert a TabBarViewController has this issue.
Edit 2: Problem disappeared then came back. Posted the problem (which persists on for even a brand new xcode project with tab bar view controller). It is at https://github.com/AlekPiasecki/XcodeProblems
Edit 3: To anybody that has the same issue: This is almost certainly due to hardware. I have the latest version of XCode (the XCode 8 beta) and OS Sierra installed on my computer. The github post continues to have the same issue for me, but it appears fine on computers which do not have these betas installed. As far as fixing the problem now that I am stuck with these Xcode and OS versions... I still have no idea.
Adding an image to the TabBarViewController fixes this issue. The blue box goes into whatever size the image is, so making the image really small (like, say, a pixel) shrinks the blue box so that is invisible (essentially). This works in practice as a solution, but don't know how to truly permanently get rid of it.
This is a Xcode error that will be fixed in 8.2 release.
This is the Apple official note about this problem.
Look in the link for Interface Builder > Resolved Issues > UITabBarController
https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html

Xcode 8.0 layout issue after open storyboard and perform update frames

I developed a project using xcode 7 and i updated my xcode to version 8.0 . According to the below steps it happens (I just wanted to show in which step this layout bug appears).
i opened my previous project and run in xcode 8 it works fine at first without opening the story board from xcode. (This is only a one view of my app).
And i open the story board by selecting iphone SE (new feature of xcode 8)
i ran the project after opening the storyboard, then this view looks fine too but the storyboard view was a mess
(but many other views looks messy in my iphone after opening the storyboard)
storyboard view looks like this
according the the stack overflow researches i perform "update frames" action in storyboard to this view. after that it looks good in storyboard
but it looks wired when run in iphone after perform "update frames"
is this a bug in xcode 8 or any solutions to this. this layout issue starts after opening the storyboard from xcode 8, without that it works fine in UI
you can check this link :https://forums.developer.apple.com/thread/63133 it should help you a little bit , or (I have done this option in my projects) you can change the frame( of ViewController) to freeroam (600, 600) , if your view looks totally different. The final option is to make you constrains again to fit the ViewController's size(the longest but I think that the best option).
Did you put your UI in a subview?
Cause I have the exactly same problem with you,
and I solved the problem by adding " self.layoutIfNeeded() " in the area which generate my subview.
Hope this help.
This issue is resolved by Apple in xcode 8.1 please download the new xcode and try it again running on simulator or device you may get this issue resolved i have done this and it resolve my issue at once while i am now using xcode 8.1.

Weird space in iOS7

I just ran a demo app on iOS 7 target, this is what I get:
I'm using a storyboard and it looks well in iOS8. Constraints are correct.
I already checked e.g.
UITableView is starting with an offset in iOS 7
but the issue in this case is the whole thing, incl. status bar has the offset, no idea what this is. I played around with the layout settings of the view controller in the storyboard without any effect.
I also created a brand new (single view) project, ran it without changing anything, got the same issue. Don't know what can go wrong in a new project concerning autolayout as I can't set any constraints in the root view controller's view...
Any ideas?
Thanks in advance.
Try adding a "Default-568h#2x.png" launch screen to keep your iOS 7 device from running the app in Letterbox mode.
What Apple really wants you to do is use Auto-layout (see point 1 in the linked blog), which is what I suspect your demo app isn't doing.

Resources