STOP UIWebView在设备中垂直反弹 [英] STOP UIWebView bounces vertically in device
本文介绍了STOP UIWebView在设备中垂直反弹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用此代码停止uiwebview垂直反弹,并且在模拟器4.0中可以正常工作.但是,当我在第一代ipod中安装我的应用程序后,它将无法正常工作.
I am using this code to stop uiwebview bounces vertically and its work fine in simulator 4.0.But when i installed my app in my first generation ipod it wont work.
for (id subview in webView.subviews)
if ([[subview class] isSubclassOfClass: [UIScrollView class]])
((UIScrollView *)subview).bounces = NO;
有人可以帮助我吗?除此之外还有其他原因吗?
Can anyone help me? Is there any reason beyond this ?
先谢谢了……
推荐答案
您必须在webViewDidFinishLoad函数中定义跳出设置.
You have to define your bounce settings in the webViewDidFinishLoad function.
我通过以下方式在webview委托视图控制器中对其进行了修复:
I fixed it in my webview delegate view controller by this way :
-(void) webViewDidFinishLoad:(UIWebView *)webView
{
[[_webView.subviews objectAtIndex:0] setBounces:NO];
}
我希望它能对您有所帮助:)
I hope it will help you :)
这篇关于STOP UIWebView在设备中垂直反弹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文