maxep / MXParallaxHeader

Simple parallax header for UIScrollView
MIT License
1.73k stars 251 forks source link

What is the reason of calculating relativeYOffset in that way? #98

Closed arturdev closed 5 years ago

arturdev commented 6 years ago

Hi @maxep. Thnx for such a great library.

The line 217:

CGFloat relativeYOffset = self.scrollView.contentOffset.y + self.scrollView.contentInset.top - self.height;

Isn't just contentOffset.y enough?

CGFloat relativeYOffset = self.scrollView.contentOffset.y // This should be enough for calculating the Y position?

If not, then in which case appending self.scrollView.contentInset.top - self.height is necessary?

Thanks in advance.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.