//Move to bookmarked place if page is opened from bookmark section.
- (void)webViewDidFinishLoad:(UIWebView *)webView1;
{
if(chkview == 2)
{
//Move webview to chkScrollValue position.
[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"document.body.scrollTop = %d", chkScrollValue]];
// [webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"window.scrollBy(0,%d);",chkScrollValue]];
}
}
I’m loading my webview which was displaying html which was in resources folder and it was working fine. Now, i’m using javascript with html and this is not working anymore.
I got the solution. I was performing this task after
webViewDidFinishLoad. Rather than that now I added another function and added this code in function[self performSelector:@selector(loadBookmark) withObject:nil afterDelay:0.4];