I have a WebView into which I'm loading a web page. I want to allow the user to zoom in on the web page in a similar fashion as they would with the web browser. Any ideas how to enable this? Thanks in advance
Asked
Active
Viewed 420 times
1
-
1Possible duplicate of [How can I enable zoom in on UIWebView which inside the UIScrollView?](https://stackoverflow.com/questions/2219685/how-can-i-enable-zoom-in-on-uiwebview-which-inside-the-uiscrollview) – Nilesh Mar 19 '18 at 10:03
-
just set scalesPageToFit=YES – Nirav Kotecha Mar 19 '18 at 10:04
2 Answers
0
Set scalesPageToFit=YES and also checkout the answers here:
How can I enable zoom in on UIWebView which inside the UIScrollView?

Nilesh
- 1,493
- 18
- 29
0
First add the webview delegate , then add this codes.
- (void)viewDidLoad
{
[super viewDidLoad];
self.Your_WebView.scalesPageToFit=YES;
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self.Your_WebView.scrollView setZoomScale:3.0 animated:YES];
}

ManiVasanth
- 86
- 6