mamaral / Neon

A powerful Swift programmatic UI layout framework.
MIT License
4.58k stars 389 forks source link

keep aspect-ratio of view #52

Closed MartinP7r closed 7 years ago

MartinP7r commented 7 years ago

I might just not see it, but is there any way to implement a dynamically sized view that keeps its aspect-ratio?

Best Regards

mamaral commented 7 years ago

I don't see why not - can you give an example? You provide the width and height of the view in many cases, so if you do your own calculations with that aspect-ratio and feed in the correct sizes, it should just work.

wdcurry commented 5 years ago

This would truly round out this amazing repo. Group fill where each element of the filling array is assigned the required ratio rather than the currently set equality. THIS would be put to use immediately.