Mahe
Mahe

Reputation: 98

How to always show last page of the UIWebView

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

Answers (3)

anand arun
anand arun

Reputation: 9

try this

- (void)webViewDidFinishLoad:(UIWebView *)webView 
{
    myWebView.scrollView.contentOffset = CGPointMake(0, CGFLOAT_MAX);
}

Upvotes: 0

βhargavḯ
βhargavḯ

Reputation: 9836

try to set contentOffset

- (void)webViewDidFinishLoad:(UIWebView *)webView {
    myWebView.scrollView.contentOffset = CGPointMake(0, CGFLOAT_MAX);
}

Upvotes: 2

Ha cong Thuan
Ha cong Thuan

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

Related Questions