iosxamarinxamarin.iosiosdeployment

xamarin IOS designer cannot constraint to super view edges?


I just updated my Xamarin version and I found that I cannot constraint to the leading edge or trailing edge of the Container View. However, I can only constraint to the Leading margin or Trailing margin(Picture Attached). Is there a way to let me constraint to the edges of a super view not the margin?

enter image description here


Solution

  • Here's my workaround for the time being:

    1. Set the constraint in the designer, then save and close it.
    2. Open the storyboard in a text editor and update the constraint element's attribute from "leadingMargin" (or "trailingMargin") to just "leading" (or "trailing")
    3. Reopen the storyboard in the designer and it should then show up correctly.

    FYI, this doesn't appear to be an issue in Xamarin Studio, just VS.