I know a similar question has been asked before but it seemed never been answered. I have a UIWebView and add some content by string. I use UIWebView because I add some imag
This is fairly simple. First, you'll need to obtain height of the webpage:
NSInteger height = [[webView stringByEvaluatingJavaScriptFromString:@"document.body.offsetHeight;"] intValue];
Now you have the height of the document stored in the height variable. To scroll to bottom you have to use javascript again:
NSString* javascript = [NSString stringWithFormat:@"window.scrollBy(0, %d);", height];
[webView stringByEvaluatingJavaScriptFromString:javascript];
Of course you need to call them in proper moment. That is
– webViewDidFinishLoad:(UIWebView *)webView
method of your webview delegate.
Hope this was helpful, Pawel