Skip to content

Fix horizontal anchor method signatures #6

Description

@jduff

Currently we have

public enum HorizontalAnchor {
    case leading, trailing, left, right, centerX
}

which groups all the horizontal anchors together. This isn't quite correct since you can only combine leading, trailing, centerX together and left, right, centerX together. If you attempt to constrain leading to left you get a runtime error.

We should ensure the correct types are being used together using the method signatures to enforce it, if possible, so the compiler can provide this warning earlier or prevent the erroneous call outright.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions