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?
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?
Try this:
- (void)webViewDidFinishLoad:(UIWebView *)webView {
[webView.scrollView setContentSize: CGSizeMake(webView.frame.size.width, webView.scrollView.contentSize.height)];
}
Add below meta to html head, if you are able to modify the html.
<meta name="viewport" content="width=device-width" />