I have constructed a paradigm just to show you what kind of problem I'm facing.
Imagine you want to make a button appear every time the web page is scrolled to top (not scrolling upwards but when the web page has reached top) and you want the button to disappear the moment the user scrolls downwards.
Any reasonable man would think that by checking the scrollView.contentOffset.y you could get the scrolling state of the web page. If it's 0 then it's on top.
if (scrollView.contentOffset.y == 0) {
// It's on top.
}
However, there are some pages where this method doesn't work. For example: http://www.apple.com/iphone-5s/
The contentOffset remains (0, 0) no matter how much you scroll downwards. I don't care about pages that aren't scrollable. I only care about pages that are scrollable but the contentOffset remains (0, 0) like the one above.
How do I solve this problem? Maybe using javascript? I'm out of ideas.