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

可紊 提交于 2019-12-23 12:28:14

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/27172640/how-to-add-a-height-width-constraint-with-ios-designer-in-xamarin-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!