52inc / Pulley

A library to imitate the iOS 10 Maps UI.
https://cocoapods.org/pods/Pulley
MIT License
2.02k stars 265 forks source link

dynamic height for partiallyRevealed #336

Closed hixfield closed 5 years ago

hixfield commented 5 years ago

I want to use the drawer only in [.collapsed, .partiallyRevealed] mode. In partiallyRevealed mode I use the partialRevealDrawerHeight delegate method to signal the height I need. However this height changes (via some event that is fired based on result of web service). How can I tell the drawer to take the new height into account? If the drawer is partialRevealed at moment of update, how can I make it animate to the new partialRevealDrawerHeight?

amyleecodes commented 5 years ago

You can call setNeedsSupportedDrawerPositionsUpdate() on PulleyViewController to refresh the supported positions and sizes.

hixfield commented 5 years ago

This works perfectly and is animated too. Thanks for the fast reply!