Skip to main content
Solved

Is it possible to use auto layout to scale a container but keep its ratio intact?

  • January 28, 2021
  • 3 replies
  • 1692 views

Kev_Craven

If it is possible, I can’t think how to do it. Here are some screens for context…

I want the grey box to keep its aspect ratio across different frame sizes. I have an image that needs to be fully displayed.

Any help appreciated, thanks!

Best answer by Steven

Yes sure, please check this amazing work by @chudoloo

View original

3 replies

Steven
  • 122 replies
  • Answer
  • January 28, 2021

Yes sure, please check this amazing work by @chudoloo


Kev_Craven
  • Author
  • 1 reply
  • January 28, 2021

Well I can now see why I did not think of that myself! That genuinely is genius. Thank you for sharing!


chudoloo
  • New Participant
  • 35 replies
  • January 28, 2021

Thanks! Team effort w/ @Vitalii_Sologub! Here’s my source.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings