Layout issue in Interface Builder XCode 8.3 - ios

I have this weird issue in interface builder. When I place a UILabel in a UIView and drag it to the leading/trailing end of its superview I'm not seeing any blue line (which is usually 8 points from the edge).
I tried to find if there's an option in Editor menu to reset it but no luck.
Anyone faced the same issue and resolved it?

Here we go :]
The problem is that Xcode is an IDE with quite a lot of bugs. They are usually very small, but sometimes very annoying.
I always restart Xcode from time to time.
And when something isn't working, as it should, restart of Xcode solves this problem in 99% of cases.
So, try to restart Xcode. Hope it will help.

Solved it by enabling Snap to Guides from Editor menu.

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.

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

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.

Storyboard warning not shown

In Xcode Version 7.3.1.
Storyboard warning not shown in one mac, but shows on others. What would cause it and how to fix it?
I have tried following ways, but none of them work.
re-open Xcode
Reboot Mac
Clear DerivedData
Warnings are all autolayout constraints issues.
Things you can try:
verify both are Xcode 7.3.1
send the files from each computer to one place and diff them
click on the red or yellow warnings, and see what constraint is at fault, and manually look on the other Mac to see if it has the same constraint.
My guess is the files aren't identical.
Please try:
Right click your storyboard -> Open as -> Interface builder.
I figured it out what causes the warning eventually:
Earlier, I changed the “ landscape" from w:Any h:Any to w:Regular h:Compact, which impacts the constraints.
That causes the storyboard no showing warning in mine, but in other people's mac, "landscape" setting is still w:Any h:Any, there are conflicts.

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.

Inspector size on xcode 5 is showing nothing

In xcode 5 with iOS7 target project the size inspector in storyboard is not work. When I have one element selected like a button, view or anything else and I go to size inspector of storyboard all is empty showing nothing.
I tried restarting Xcode, unchecking Autolayout, uninstalling an reinstall Xcode and nothing. This problem persists.
Is very strange that on other Macs I open the project and size inspector works correctly then not is a project issue.
If someone have the same problem and solve it. Please tell me how can I fix.
Thanks.
The answer that helped me is here. MouseOver "View" shows Button "Show".
Reinstall of MAC OS X solves this issue 100%. In inspector size. But in size inspector you've probably noticed the "Show"|"Hide" watermark an the right top corner of panel. I agree that these hidden invisible buttons in IB is not the best solution in terms of UX. But Apple knows better :)

Resources