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,560
  • 7
  • 52
  • 83
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,230
  • 9
  • 39
  • 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
  • 519
  • 5
  • 10