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

Add support for .centerCenter when using the distribute method #11

Open
eonist opened this issue Apr 26, 2021 · 0 comments
Open

Add support for .centerCenter when using the distribute method #11

eonist opened this issue Apr 26, 2021 · 0 comments

Comments

@eonist
Copy link
Owner

eonist commented Apr 26, 2021

for now its possible to do:

let yAnchors = Constraint.distribute(vertically: views, spacing: 24, offset: .init(x: 24, y: 24))
let xAnchors = views.map { Constraint.anchor($0, to: self, align: .centerX, alignTo: .centerX) }
let anchors: [AnchorConstraint] = Array(zip(xAnchors, yAnchors.map { $0.x }))
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