exyte/ScalingHeaderScrollView

Is it possible to programmatically scroll/hide the header?

mcantop opened this issue · 2 comments

Hello,

First off thank you for this package.

I am wondering if it is possible to programmatically scroll/hide the header? Currently, if my content height is long enough and is scrolled all the way down, after I toggle the binding value from .scrollToTop(resetScroll:) it smoothly moves to the top - the large header is hidden (screenshot 2).
Is there a way to achieve a similar behaviour, but when the large header is actually visible? If It is scrolled all the way up (screenshot 1) and I toggle the binding - nothing happens.
I basically want to move from screenshot 1 to screenshot 2 programmatically (in this case, after user selects a date on calendar) - is it possible?

Thank you

f3dm76 commented

Hey @mcantop, currently it is not possible. I think I can add it as soon as I have time, in the meantime you are most welcome to submit a PR - should be similar to resetScroll you mentioned

f3dm76 commented

Hey @mcantop, please check out version 1.0.0, there is a new snapHeaderToState modifier, allowing you to programmatically scroll/hide the header. Have a wonderful day!