How to refresh a UIWebView by a quot;pull down and releasequot; gesture?(如何通过“下拉和释放刷新 UIWebView手势?)
问题描述
我知道这在 iPhone 版 Tweetie 或 xkcd iPhone 应用程序中是可能的,但他们使用的是表格.知道这是否也可以用于简单的 UIWebView 吗?我知道 this SO question 中的 Javascript 建议,但是如何在本地制作呢?
I know that this is possible in the Tweetie for iPhone or the xkcd iPhone app, but they are using a table. Any idea if this can be done for a simple UIWebView as well? I'm aware of the Javascript suggestions in this SO question, but what about making that natively?
推荐答案
仅供参考,iOS 5 已正式在 UIWebView 中引入了 scrollView 属性.我测试了它.它与 EGO 的拉取和刷新代码完美配合.所以这个问题不再是任何 iOS 5 设备的问题.
FYI, iOS 5 has officially introduced the property scrollView in UIWebView. I tested it. It worked perfectly with EGO's pull and refresh code. So the problem is no longer a problem for any iOS 5 devices.
为了向下兼容,您仍然需要@CedricSoubrie 的代码.
For downward compatibility, you still need @CedricSoubrie's code though.
这篇关于如何通过“下拉和释放"刷新 UIWebView手势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何通过“下拉和释放"刷新 UIWebView手势?
基础教程推荐
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
