Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a height/width constraint with iOS Designer in Xamarin Studio?

As the title indicates I want to add a constraint like with Xcode with the Pin button, but there is no such button in Xamarin Studio. I can't figure out where do I add a height constraint.

With height constraint I mean a constraint like

viewA.height = null * multiplier + constant

i.e. NSLayoutAttribute.NoAttribute should be used!

How can I do that with iOS Designer?

like image 551
testing Avatar asked Dec 14 '22 18:12

testing


1 Answers

You have to left-click once on the heigth/width pin. Then the constraint is created for you with the current frame size.
UPDATE: In current Xamarin, when left-click on "I-bar" pin, you get two choices:
(1) "Width" (or Height), which creates a "Constant Width" (Height) e.g. "Width = 100", and
(2) "Aspect Ratio", which creates a Width-to-Height constraint, e.g. "Width = 1:1 * Height".

See how you create the height constraint

like image 177
testing Avatar answered Feb 19 '23 03:02

testing