SebastianBoldt / Jelly

🌊 - Jelly is a library for animated, non-interactive & interactive viewcontroller transitions and presentations with the focus on a simple and yet flexible API.
http://www.sebastianboldt.com/
MIT License
2.45k stars 123 forks source link

How to use CoverPresentation to automatically size the presented view controller based on content? #85

Open StainlessStlRat opened 7 months ago

StainlessStlRat commented 7 months ago

Hello!

I have been using your wonderful library for many years now, but I am at a loss at to how to implement this properly.

I want to present a view controller that only takes up as much space as its view needs. The way I've been achieving this feels pretty dirty; calculating the expected height of the view and incorporating that value into the marginGuards.

This works well enough, but now I've got a view that is too complex to calculate based whose root view is a stack view whose children views have been arranged programmatically.

How can I let Jelly calculate the required minimal presentation size, if possible?