Forum Xamarin.iOS
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Xamarin.iOS Designer(Storyboard) is broken

VetaLioSTVVetaLioSTV USMember ✭✭

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.

Posts

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    @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.)

  • VetaLioSTVVetaLioSTV USMember ✭✭

    @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.

Sign In or Register to comment.