Reputation: 98
i am using UIWebview
as a console page for particular downloading process ,i want to show last line or last page of UIWebview like console. so please tell any methods there for that.i am adding text to UIWebview
different places using following code [webView loadHTMLString:theApp.consoleUpdaterStr baseURL:nil];
Upvotes: 0
Views: 179
Reputation: 9
try this
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
myWebView.scrollView.contentOffset = CGPointMake(0, CGFLOAT_MAX);
}
Upvotes: 0
Reputation: 9836
try to set contentOffset
- (void)webViewDidFinishLoad:(UIWebView *)webView {
myWebView.scrollView.contentOffset = CGPointMake(0, CGFLOAT_MAX);
}
Upvotes: 2
Reputation: 683
try this :
CGPoint bottomOffset = CGPointMake(0, myWebview.scrollView.contentSize.height - myWebview.scrollView.bounds.size.height);
[myWebview.scrollView setContentOffset:bottomOffset animated:YES];
Upvotes: 2