How do I enable the zoom in/out option in a UIWebView?

亡梦爱人 提交于 2019-12-10 19:08:20

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!