Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix horizontal anchor method signatures #6

Open
jduff opened this issue May 24, 2017 · 0 comments
Open

Fix horizontal anchor method signatures #6

jduff opened this issue May 24, 2017 · 0 comments

Comments

@jduff
Copy link
Owner

jduff commented May 24, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant