FluentLayout / Cirrious.FluentLayout

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

Active flag is not applied when creating constraints #65

Open IainS1986 opened 3 years ago

IainS1986 commented 3 years ago

It appears the Active flag doesn't get set inside the CreateConstraint() method inside FluentLayout.

This means, if you create 2 or more competing constraints, set the one you want to active, then call UIView.AddConstraints they will all get set to Active = true and you'll get a bunch of errors about constraints not being satisfied.

You then need to set Active flags after setting UIView.AddConstraints.

Ideally, CreateConstraint() should set the active flag so we can add them in UIVew.AddConstraints and not get any issues or have the state reset.