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

Adding aspect ratio functions #174

Merged
merged 5 commits into from
Nov 12, 2024
Merged

Adding aspect ratio functions #174

merged 5 commits into from
Nov 12, 2024

Conversation

jezreelbarbosa
Copy link
Contributor

@jezreelbarbosa jezreelbarbosa commented Nov 2, 2024

An easy way to set aspect ratio to views
Example of usage:

let movieBanner = UIImageView()
movieBanner.top(16).fillHorizontally(padding: 16).aspectRatio(16.0/9.0)

let poster = UIImageView()
poster.leading(16).fillVertically(padding: 16).aspectRatio(66%) // 2:3

@s4cha
Copy link
Member

s4cha commented Nov 12, 2024

Hi @jezreelbarbosa,
You're adding a handy function, providing clean code using underlying apis and all that with unit tests.
What's more to ask ?! 💯
Thanks a lot for your patience,

@s4cha s4cha merged commit 74ea064 into freshOS:master Nov 12, 2024
1 of 2 checks passed
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