0

I am trying to show some content on webview. No problem in showing the content. But, I have a text field at the end of the content. I want to fix it on my webview even I am in starting of the webview scroll. It was done automatically if I enable page to fit for my webview. But, scale page to fit does not satisfy my requirement.

Any suggestions appreciated. Thanks!

  • This may [help](http://stackoverflow.com/questions/3594851/how-can-i-scroll-programmatically-to-the-bottom-in-a-uiwebview) – Shams Ahmed Aug 05 '14 at 10:15
  • That is the case loading a web page on webview. In my actual case I am loading the twitter script. I am unable to get the document height as specified in the above post. Correct my if i am in wrong way – Sravani Pavuluri Aug 05 '14 at 10:51
  • calling the code in webViewDidFinishLoad method which get executed once the page has successfully loaded should be fine as they script ould have inserted in content within the DOM. – Shams Ahmed Aug 05 '14 at 10:56
  • I set NSInteger height = [[webView stringByEvaluatingJavaScriptFromString:@"document.body.offsetHeight;"] intValue]; NSString* javascript = [NSString stringWithFormat:@"window.scrollBy(30, %ld);", (long)height]; [webView stringByEvaluatingJavaScriptFromString:javascript];But, it not solved my problem – Sravani Pavuluri Aug 05 '14 at 11:43

0 Answers0