locked
Xamarin.iOS Designer(Storyboard) is broken RRS feed

  • Question

  • User166732 posted

    Hello to everyone.
    I'm doing step by step actions of Xamarin University(Xamarin.iOS - "Getting started with the ios designer") and i can't understand why that happens, but constraints on AutoLayout won't work, seems that this "+" button(Add recommended constraints) on Designer works incorrect. As i understood correctly , it should add four constraints(fully-constrained-view),but it add only couples(sometimes 2-3). Can someone explain why this happens and how to use Xamarin.iOS Designer properly...?

    PS XS 6.1.5 and xCode 8.2, in nutshell i have installed lastest stable SDK/IDE stuff.

    Thursday, February 16, 2017 2:54 PM

All replies

  • User21936 posted

    @VetaLioSTV

    Yes, I have always noticed that adding the recommended constraints does not necessarily add the "4 constraints minimum" as suggested in that course. The thing is that in reality it would be hard to do so and I feel that you would end up having to change things anyway. For instance, let's say you put your first element on the canvas, a UILabel perhaps, and you click that + button. Normally it adds a constraint to the two closest edges. Ideally it would add a height and width constraint too, but this may not be proper as you likely would want the width or height to vary based on the parent views width/height, so I personally am not convinced that it is a good idea to add all four constraints in such a situation. Ultimately I would see one having to remove those width and height constraints as the UI develops to allow for more proper sizing of the control. IOW "Adding recommended constraints" does not necessarily mean "add all required constraints."

    I would recommend just adding any needed additional constraints after using the + button. Think of the plus button as a "starter." (Note: this is my personal opinion, I am not on the ISO Designer engineering team. They may be better able to explain the decision they made on what constraints are added when the + button is clicked.)

    Thursday, February 16, 2017 8:31 PM
  • User166732 posted

    @JGoldberger said: @VetaLioSTV

    Yes, I have always noticed that adding the recommended constraints does not necessarily add the "4 constraints minimum" as suggested in that course. The thing is that in reality it would be hard to do so and I feel that you would end up having to change things anyway. For instance, let's say you put your first element on the canvas, a UILabel perhaps, and you click that + button. Normally it adds a constraint to the two closest edges. Ideally it would add a height and width constraint too, but this may not be proper as you likely would want the width or height to vary based on the parent views width/height, so I personally am not convinced that it is a good idea to add all four constraints in such a situation. Ultimately I would see one having to remove those width and height constraints as the UI develops to allow for more proper sizing of the control. IOW "Adding recommended constraints" does not necessarily mean "add all required constraints."

    I would recommend just adding any needed additional constraints after using the + button. Think of the plus button as a "starter." (Note: this is my personal opinion, I am not on the ISO Designer engineering team. They may be better able to explain the decision they made on what constraints are added when the + button is clicked.)

    Thanks for the reply. AS i remember(approx 1 year ago),i have tried to do same stuff and it worked pretty well. At lastest Xamarin Studio 6.1.5 many things are disappeared on Xamarin.iOS designer(like changing the current iOS version and etc,i have no idea what the reason was to drop it from menu). Anyway thanks for your advice,i will try it.

    Thursday, February 16, 2017 8:37 PM