FluentLayout / Cirrious.FluentLayout

FluentLayout for Xamarin.iOS - sample uses MvvmCross
Microsoft Public License
148 stars 54 forks source link

Deprecation of ToLayoutConstraints() #27

Closed mrtnkrstn closed 8 years ago

mrtnkrstn commented 8 years ago

I use ToLayoutConstraints() in the following manner:

FluentLayout heightFluentLayout = view.Height().EqualTo(100); NSLayoutConstraint heightConstraint = heightFluentLayout.ToLayoutConstraints().First();

(where view is some UIView), and then add this constraint to the parent view. I can now use heightConstraint to change the height of the view, e.g. as follows:

heightConstraint.Constant = 130;

Now that ToLayoutConstraints() is destined for obsoletion, is there another way to achieve the above?

Thanks!

gshackles commented 8 years ago

Yeah, you can now simply manipulate heightFluentLayout.Constant which will be propagated down to the underlying constraint. You can find more details in my blog post here: http://gregshackles.com/fluentlayout-2-5/