Feature Request: Support size equalities in views / layoutGuides
JohnEstropia opened this issue · comments
Sample syntax:
button2.mondrian.buildSelfSizing {
$0.width(.like(button1), .exact(0)).height(.like(button1), .exact(0))
}
button1.mondrian.buildSelfSizing {
$0.minWidth(60).minHeight(44)
}
you're talking about Classic layout API?
it's could be better to start describing with view.mondrian.layout
.
then, view.mondrian.layout
has horizontal
, edge
. so how do you think about adding like
in addition.
(currently available)
box1.mondrian.layout.horizontal(.toSuperview).activate()
(example syntax to achieve that you're requesting feature)
button2.mondrian.layout.like(.to(button1)).activate()
I'm not pretty sure like
is good naming against .to()
or .toSuperview
button2.mondrian.layout.like(.to(button1)).activate()
What if we only need either width
or height
to be match, but not both?
what if you need width to be match. it's gonna be following.
button1.mondrian.layout.width(.to(button2).width).activate()
did I answer?
that's been available from this PR
Sorry, I didn't know that UILayoutGuides are already supported there. Thanks, closing this ticket now