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

Use Anchorage edge shorthand where possible #23

Open
ZevEisenberg opened this issue Nov 21, 2016 · 3 comments
Open

Use Anchorage edge shorthand where possible #23

ZevEisenberg opened this issue Nov 21, 2016 · 3 comments

Comments

@ZevEisenberg
Copy link

verticalAnchors, horizontalAnchors, and edgeAnchors should all be used if possible.

@KingOfBrian
Copy link
Contributor

Good idea! I think I may add an analysis pass after the CodeGenerators are populated in the XIBDocument. This could do the duplicate variable name detection, and coalesce ConstraintCodeGenerator to use the edge shorthands.

@KingOfBrian
Copy link
Contributor

Should be able to follow a pattern like this to scan statements for 2 or 4 matching generators and replace them with the compound anchors.

https://github.com/Raizlabs/Eject/blob/master/EjectKit/Builder/ActionBuilder.swift#L37

@ZevEisenberg
Copy link
Author

Now we have centerAnchors as well.

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

No branches or pull requests

2 participants