var cyan = new UIView { BackgroundColor = UIColor.Cyan };
var red = new UIView { BackgroundColor = UIColor.Red };
View.AddSubviews(cyan, red);
View.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();
View.AddConstraints(cyan.FullSizeOf(View, 20));
View.AddConstraints(red.FullSizeOf(cyan, new Margins(10, 30)));
above code is working.
for my ios project, i want to set the red view as a subview for cyan view.
so i changed the code to
var cyan = new UIView { BackgroundColor = UIColor.Cyan };
var red = new UIView { BackgroundColor = UIColor.Red };
View.AddSubview(cyan);
cyan.AddSubview(red);
View.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();
View.AddConstraints(cyan.FullSizeOf(View, 20));
cyan.AddConstraints(red.FullSizeOf(cyan, new Margins(10, 30)));
The constraints are not woking. then i do not see the red view.
Is something wrong for me? Please check this. Thanks!
hi, i am meeting a constraints issue.
above code is working.
for my ios project, i want to set the red view as a subview for cyan view. so i changed the code to
The constraints are not woking. then i do not see the red view.
Is something wrong for me? Please check this. Thanks!