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

Converge on consistent preposition for describing alignment target #79

Closed
NickEntin opened this issue Jan 8, 2022 · 1 comment · Fixed by #84
Closed

Converge on consistent preposition for describing alignment target #79

NickEntin opened this issue Jan 8, 2022 · 1 comment · Fixed by #84
Milestone

Comments

@NickEntin
Copy link
Collaborator

We currently use a mix of "with" and "to" when talking about alignment.

The base method and most parameterized usages use "with:"

  • align(.center, with: view, .center)
  • align(.center, withSuperviewPosition: .center)

But the superview methods use "to:"

  • alignToSuperview(.center, offset: .zero)
  • alignToSuperview(.center, inset: 42)

I feel strongly that we should converge on a single preposition to use in all of these cases, but I could be convinced to go with either one. I'm leaning towards "with," but curious is anyone else feels strongly.

@AliceAponasko
Copy link
Collaborator

How about renaming these

alignToSuperview(.center, offset: .zero)
alignToSuperview(.center, inset: 42)

to

align(withSuperview: .center, offset: .zero)
align(withSuperview: .center, inset: 42)

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

Successfully merging a pull request may close this issue.

2 participants