I have a UIWebView that uses a fixed position header.
When the ViewController that contains the UIWebView is the initial view, there is no problem with the fixed position divs.
When I display that same ViewController through a Modal segue, that’s when the problem occurs.
The first time I scroll on the page, the divs move and scroll with the page, but once I let go of scrolling for the first time, the div returns to its fixed position and the error never happens again.
Any ideas? I’ve seen iScroll, it doesn’t quite work like I want the page too, and I think there’s an easier way, since I only get the problem on the initial load of the UIWebView…
I used a CSS workaround, positioning the header as absolute in the top left corner, and giving the main
<div>anoverflow-y: scroll;, and keeping thebody { height: 100%; }.This resulted in kind of a knock-off iScroll!
EDIT
Also, you can insert this:
-webkit-overflow-scrolling: touch;Into the main
<div>css for a more native feel.