开发者

How to only disable the horizontal scrolling of UIwebView from within the iPhone app?

开发者 https://www.devze.com 2023-03-23 21:59 出处:网络
I am making a iPhone app that needs to make a UIwebview that can only scroll vertically(I need to disable to the horizontal scrolling), I c开发者_如何学JAVAan\'t really do it from the website because

I am making a iPhone app that needs to make a UIwebview that can only scroll vertically(I need to disable to the horizontal scrolling), I c开发者_如何学JAVAan't really do it from the website because that's not in my control. How to implement that?


You can do this by adding the following in the section of your HTML:

<meta name="viewport" content="width=device-width" />

Do this either before you load the file into the web view or use stringByEvaluatingJavaScriptFromString:

0

精彩评论

暂无评论...
验证码 换一张
取 消