objective-c - 我可以使用webview的scrollview.bounces属性来处理webview滚动吗?

标签 objective-c webview app-store scrollview

我想停止在webview中弹跳。如果我在代码中使用以下语句,我的应用程序会在appstore中被拒绝吗?

self.viewController.webView.scrollView.bounces = NO;

谢谢!

最佳答案

if ([[[UIDeice currentDevice] SystemVersion] floatValue] >= 5.0)//iOS>=5.0
{
    webView.scrollView.bounces = NO;
}
else//iOS<5.0
{
    for (id subview in webView.subviews)
    {
       if ([[subview class] isSubclassOfClass: [UIScrollView class]])
         ((UIScrollView *)subview).bounces = NO;
    }
}

关于objective-c - 我可以使用webview的scrollview.bounces属性来处理webview滚动吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16766952/

相关文章:

objective-c - 如何让 NSView 不裁剪它的边界区域?

objective-c - 向 NSView 添加 subview 会显示,但无法删除

ios - 在现有应用程序上推送一个完整的新 xcode 项目应用程序

iphone - 通过 iPad 应用程序从 itunes 商店购买

ios - 如何查看未启动的代码签名 mac 应用程序的日志?

objective-c - iOS 如何从数组中读取值

objective-c - 如何在不覆盖 objective-c 的情况下保存文本文件

Android - 使用 WebView 评估 javascript 字符串并返回值

android - 在android webview中加载静态页面

android - 使 Android WebView 不存储 cookie 或密码