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手势?
基础教程推荐
- Xcode UIView.init(frame:) 只能在主线程中使用 2022-01-01
- 如何比较两个 NSDate:哪个是最近的? 2022-01-01
- navigationItem.backBarButtonItem 不工作?为什么上一个菜单仍然显示为按钮? 2022-01-01
- UIImage 在开始时不适合 UIScrollView 2022-01-01
- 如何将图像从一项活动发送到另一项活动? 2022-01-01
- SwiftUI-ScrollViewReader的ScrollTo不滚动 2022-01-01
- Android Volley - 如何动画图像加载? 2022-01-01
- Play 商店的设备兼容性问题 2022-01-01
- 为什么姜饼模拟器方向卡在应用程序中? 2022-01-01
- iOS - UINavigationController 添加多个正确的项目? 2022-01-01
