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

Easy Width & Height Constraints #10

Merged
merged 3 commits into from
Jun 25, 2018
Merged

Conversation

eddiekaiger
Copy link
Collaborator

Specific height and width constraints are quite common, so I figured these would be useful:

view.constrainHeight(to: 42)
view.constrainWidth(to: 100)

More importantly, these make for faster autocompletion in Xcode.

Also removed some redundant methods. I think I initially separated methods so that we didn't have the first parameter have a default argument (e.g. constraint(_ relation: Relation = .equal, ...)), but autocomplete seems to work fine with it.

@eddiekaiger eddiekaiger merged commit 1316819 into master Jun 25, 2018
@eddiekaiger eddiekaiger deleted the width-and-height-methods branch June 25, 2018 16:51
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 this pull request may close these issues.

2 participants