Take layout margins and content inset into account when calculating absoluteBottom.
Without adding these adjustments back in, when scrolling up the animation will appear to start late, i.e. you need to scroll up a number of pixels equal to the height of the bottom margin and content inset before the header starts to uncollapse.
I'm not actually certain this is correct anymore... plus I used the wrong variable name (collectionView from my use case, not scrollView which is what the original uses).
Take layout margins and content inset into account when calculating
absoluteBottom
.Without adding these adjustments back in, when scrolling up the animation will appear to start late, i.e. you need to scroll up a number of pixels equal to the height of the bottom margin and content inset before the header starts to uncollapse.
See details on #8. Fixes #8.