For example, when we want to layout a view with respect to it's superview we usually have to explicitly pass in the view which doesn't look as readable
Given a viewA and a subview viewB that we're trying to make the top match
viewB.applyLayout([
.matchTopTo(viewA, withOffset: 10.0)
])
This could be better expressed by inferring the superview relationship:
view.applyLayout([
.matchTopToParent(withOffset: 10.0)
])
For example, when we want to layout a view with respect to it's superview we usually have to explicitly pass in the view which doesn't look as readable
Given a
viewAand a subviewviewBthat we're trying to make the top matchThis could be better expressed by inferring the superview relationship: