Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 22589 [details]
UIViewController layout guides displayed within the Controller itself.
After placing a new UIViewController on a Storyboard, I add an UIView and then I try to create a constraint to the Leading or Trailing anchor of that controller. As the attachment shows, the layout guide is displayed inside the controller. I thought that was a visual bug but when I ran on simulator the view is not touching the leading/trailing anchor (even with the constant set to 0).
I get this error on the Mac and on Windows. Both are updated to the latest stable version (10.10, May 24, 2017).
As a workaround, following a topic on Xamarin Forums, I've overwritten Xamarin.iOS on the Mac back to 10.8 (Apr 6, 2017). I had to edit the version inside the storyboard file in order to edit it with the downgraded version.
Link to forums discussion:
After trying out uninstall / install everything again, I can see that the bug does not happen on Xamarin Studio for Mac.
It happens on Visual Studio for Mac and also on the Visual Studio extension for Windows.
To someone who can, please help me classify
By default the constraints are relative to the margin of the top level view in a viewcontroller. Once you create the margin based constraints, just select them and use the property panel to uncheck the 'relative to margin' setting. This will give you the edge constraint you are looking for.
We are actively working on alternative ways to create edge versus margin constraints. Most of that work is complete but it is not ready to ship as of yet.
A few comments on that:
So, if I'm understanding correctly, when I add a new UIViewController, it's top leve UIView now has default margins, is that right? It didn't use to have but it does now (I'm assuming that since I could constrain a Label to the edge without any additional settings).
If that is true, how come it doesn't happen on Xamarin Studio on the Mac? It currently presents the "old" behavior. ie, let's me constrain to the edge.
I tried following your suggestion. Started a new Single Page iOS App on Visual Studio on Windows. Dropped an UIViewController. Dropped a UILabel. I drag the UILabel's leading anchor to the UIViewController's View margin (as shown in the attachment). Then, I select the constraint and there's no property "relative to margin".
Sorry if I misunderstood your comment.
Ps.: I'm setting it back to reopened just because I assume that is the flow. I'm sorry if it's not. First time here. I couldn't find the specific workflow diagram for Xamarin (only one available is the one at bugzilla's general docs).
Came here because I've just hit the same issue.
Rodrigo, the option "Relative to margin" is in the menu that appears when you click the "First Item" or "Second Item" fields.
Then, you also need to change the Constant to 0.
And if you use the document outline to quickly select the other constraint you can't type the "0" in the Constant field. This has been broken since... forever.
This workaround works but it's a pain. IMHO this is a bug and should be fixed ASAP. Working with constraints is already difficult enough.
Thanks so much for taking the time to submit this report! As @Alan stated in Comment #2, this is the intended behavior and is actually the same way this works in Xcode after Xcode 8. The iOS Designer is merely mirroring that existing behavior.