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

UIView ~ CGSize operator #1

Open
sergigracia opened this issue Feb 9, 2017 · 0 comments
Open

UIView ~ CGSize operator #1

sergigracia opened this issue Feb 9, 2017 · 0 comments
Assignees

Comments

@sergigracia
Copy link
Member

sergigracia commented Feb 9, 2017

I would like to set widthAnchor and heightAnchor directly linking a UIView to a CGSize:

let iconSize = CGSize(width: 16, height: 16)
viewA ~ iconSize

equivalent to

viewA.widthAnchor.constraint(equalToConstant: iconSize.width).isActive = true
viewA.heightAnchor.constraint(equalToConstant: iconSize.height).isActive = true
@sergigracia sergigracia self-assigned this Feb 9, 2017
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