本文介绍了如何禁用UIWebview水平滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试通过插入来禁用它:
I've tried disabling it by inserting:
<meta name="viewport" content="width=320" />
进入我的HTML字符串,上面的十几种变体徒劳地希望我搞砸了标签语法......但似乎没有任何东西阻止UIWebView水平滚动。然而,有些应用程序可以设法执行此操作(例如MobileRSS),并且可能因为它们没有被拒绝,所以它们不使用私有API。
into my HTML string, and a dozen variations of the above in the vain hope that I just screwed up the tag syntax... but nothing seems to stop UIWebView from scrolling horizontally. And yet there are apps that manage to do this (like MobileRSS), and presumably, since they haven't gotten rejected, they're not using private APIs.
推荐答案
我的版本,一个常见的解决方案:
My version, a common solution:
- (void)webViewDidFinishLoad:(UIWebView *)webView {
[webView.scrollView setContentSize: CGSizeMake(webView.frame.size.width, webView.scrollView.contentSize.height)];
}
这篇关于如何禁用UIWebview水平滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!