I have another method that I found at http://www.alexnking.com/2008/10/14/going-back-to-the-last-place-you-were-in-a-uiwebview/ which can be of great help when you want to scroll through the UIWebView manually.
To get the current scroll position (vertical):
[myWebView stringByEvaluatingJavaScriptFromString: @"scrollY"];
- (void)applicationWillTerminate:(UIApplication *)application {
[[NSUserDefaults standardUserDefaults] setInteger:
[[myWebView stringByEvaluatingJavaScriptFromString: @"scrollY"]
intValue] forKey: @"currentScroll"];
}
- (void)applicationDidFinishLaunching:(UIApplication *)application {
initialScrollPosition = [[NSUserDefaults standardUserDefaults]
integerForKey: @"currentScroll"];
}
- (void)webViewDidFinishLoad:(UIWebView *)webView {
if (initialScrollPosition != 0) {
[passageView stringByEvaluatingJavaScriptFromString:
[NSString stringWithFormat: @"window.scrollTo(0, %d);",
self.initialScrollPosition]];
self.initialScrollPosition = 0;
}
}
source
share