Im using xamarin designer with autolayout and cannot align the UITabBar to the left & right edges of the root. There is always a small margin how to remove it?
4 Answers
If you are in Xamarin using Visual Studio I finally discover how to tackle this annoying problem.
Click on the widget or view in the storyboard. In the properties window->layout you can see the constraints. Click on the constraint.
Before I was using -20 for constraints:
Now I fixed by having a constant of 0 and changing the constraint configuration:
Just remove the selection on the "Relative to Margin" checkbox.

- 1,379
- 3
- 16
- 34
Set the constant to -20 on the Trailing Margin Space and Leading Space layout elements to the Superview. I have no idea whether this is the preferred way to do this but it worked for me on my Table View.

- 125
- 2
- 11
Xcode has an option not use margins when a constraint is added.
In the iOS designer in Visual Studio, there doesn't seem to be an option when a constraint is being created.
Xcode & Visual Studio constraint margins
A work around is to create the constraint and then edit it after it has been created.
On another note, you might review why you're not using a UITabBarController which would place the Tab Bar correctly for you.
You need to uncheck the Constraint to Margin option when giving constraints for left and right using auto layout

- 450
- 7
- 22
-
All of your advice points to iOS native interface designers, I can't see any xamarin specific information in there, and trying to apply the answers in those links to xamarin in visual studio actually isn't the same. – JoeTomks Jul 18 '17 at 07:34