0

I have a view whose size is 650, I added a UIWebView to this view. When I load information in to WebView, the scroll horizontal is working. I want to disable horizontal scroll in WebView.

Can the content fit with my view?

midhunhk
  • 5,470
  • 7
  • 50
  • 79
sokna_hay
  • 11
  • 1
  • 3

2 Answers2

8

Try this:

- (void)webViewDidFinishLoad:(UIWebView *)webView {

[webView.scrollView setContentSize: CGSizeMake(webView.frame.size.width, webView.scrollView.contentSize.height)];

}
V-Xtreme
  • 7,009
  • 8
  • 37
  • 79
0

Add below meta to html head, if you are able to modify the html.

    <meta name="viewport" content="width=device-width" />
Chen Jiling
  • 461
  • 4
  • 9