In storyboard my views are messed up. Why is that? - ios

I'm using Xcode 9 Version 9.1 (9B55). There is something strange happening in a storyboard. Some of my views are are messed up, and I don't know what is the reason.
It looks like this:
EDITED
However, all my constraints are set right, and when I run the project on different simulators and on a physical device, everything looks fine. Here how it looks on a simulator/physical device:
I don't know what is the reason for this kind of behaviour but it makes impossible to work in a storyboard. I think, this problem has appeared quite recently. Sometimes, after reloading the Xcode, views again look fine, but when I start working with storyboard (adding new views, changing constraints or even just tapping on a constraint to see its constant), they again become messed up. Does anybody have this kind of issue, and how this could be solved?

After closing and opening Storyboard, the issue goes away! I think it's just an issue in x-code 9.

As a quick fix, try changing the spacing on one of your stack views instead of closing and reopening Xcode. Toggling the spacing brings back the views in my case.

Related

Everything moves around when making iPhone app Universal Xcode 7

As of now my iPhone works on iPad as it should except my problem is that some images partially show as if they got zoomed in on. So I tried turning universal devices on but that's just as bad since everything shifts into different locations.
I am using Auto Layout and this is an old app I'm wanting to update.
Missing constraints was the cause of the problem!
It seems like that missing constraints is the cause of the problem! You might want to redo the layout and constraints.

iPhone Simulator vs. Main Storyboard Preview

I have many layout constraints for a particular app, and in the main.storyboard (preview) the apps look a little bit off, but when I run them in the simulator they look how I want them. So there is disconnect between the two.
I saw the question answered that fixing the constraint warnings would then make the two appear identical.
However, I do not want to try to fix these warnings. A lot of time went into finally figuring how to lay all this out, and I'm worried fixing these (38) constraint errors will screw everything up.
My question is...with the disparity between the preview and the actual device simulation, which one will actually appear if the app is run on a real device? I would assume the one showing in simulation, but I'm really not sure. Is it safe to ignore the errors and the strange main.storyboard (preview) layout it shows me and go with the simulation? It looks how I want it for each simulated device, so I'm weary of changing anything now. Thank you!
According to my experience, Xcode has some problems in storyboard. If you have a constraint which makes a view becomes visually invisible, you will get a warning about this constraint. You can quickly fix it by clicking the warning icon BUT if you close you project and reopen it again, the warning will be there.
The final result should be the UI shown in simulator instead of interface builder or storyboard.

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.

Xcode 6.1 Autolayout issue for 3.5in display

I have a very strange issue with Autolayout. Check attacked screenshot, I am primary interested in that red topbar. I set all constraints, and it works pretty well for all sizes, except 3.5in.
How is it possible something like this? Is this an Xcode bug?
Note: There are no constraints added programatically. Everything is right there, in storyboard.
In the end, it proved to be some problems in the way I set constraints. Deleted all, and redoing them, solved the problem.

Storyboard changes not updating in simulator/iphone

I have a wierd issue were changes I make on the storyboard are not reflected on the simulator or device. This only occurs when I update the storyboard to xcode5. When reverted back to xcode 4 the storyboard works fine.
I have tried clean and deleting the app but nothing works. Any suggestions would be appreciated.
I have tried this :Storyboard won't update in simulator but I am not sure how to get to DerivedData/APPNAME/Build/Products/Debug-iphonesimultator/APPNAME.app
Xcode 5 changed the control over constraints. This will often lead to mistakes in the beginning. Use the Resolve Auto Layout Issues button to fix your mistakes.
Go to storyboard and look for the menu bar to find the Resolve Auto Layout Issues button.
There you can update constraints, add missing constraints, reset to suggested constraints, or clear all constraints.

Resources