Bri*_*ice 1 iphone scroll uiwebview uiscrollview uiview
我有一个UIWebView(其大小完全包含html),我想将此Web视图与其他一些视图一起放入UIScrollView.
如果我userInteractionEnabled = NO在网页视图上设置...除了我无法点击网页视图中的链接外,它工作正常.但是,如果我离开userInteractionEnabled = YESWeb视图...那么,如果用户在Web视图中滑动而不是滚动UIScrollView,它会在Web视图内部(在滚动视图内)反弹文本.
对此有何帮助?
谢谢!
将一堆其他答案拼凑在一起......这对我来说非常有用:
if ([_webView respondsToSelector:@selector(scrollView)]) {
_webView.scrollView.scrollEnabled = NO; // available starting in iOS 5
} else {
for (id subview in _webView.subviews)
if ([[subview class] isSubclassOfClass: [UIScrollView class]])
((UIScrollView *)subview).scrollEnabled = NO;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2844 次 |
| 最近记录: |