问题
How do I enable the zoom in/out option in a UIWebView?
回答1:
it's the default feature of UIWebView. Use your fingers
回答2:
If you want to do it programmatically this is the only way I could find to accomplish it: (specify your own sizes if you wish, i was attempting to zoom out after typing into a form field)
UIScrollView *sv = [[webViewView subviews] objectAtIndex:0];
[sv zoomToRect:CGRectMake(0, 0, sv.contentSize.width, sv.contentSize.height) animated:YES];
来源:https://stackoverflow.com/questions/2332261/how-do-i-enable-the-zoom-in-out-option-in-a-uiwebview