Skip to content

Make superview relationship implicit #1

@ajfigueroa

Description

@ajfigueroa

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)
])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions