UIRefreshControl的使用
注意:
1、需要在ios6.0之后的版本中使用
2、UIRefreshControl目前只能用于UITableViewController,如果用在其他ViewController中,运行时会错误(即UIRefreshControl只能被UITableViewController管理)
UIRefreshControl类如下所示,东西不多
NS_CLASS_AVAILABLE_IOS(6_0) @interface UIRefreshControl : UIControl /* The designated initializer
* This initializes a UIRefreshControl with a default height and width.
* Once assigned to a UITableViewController, the frame of the control is managed automatically.
* When a user has pulled-to-refresh, the UIRefreshControl fires its UIControlEventValueChanged event.
*/
- (id)init; @property (nonatomic, readonly, getter=isRefreshing) BOOL refreshing; @property (nonatomic, retain) UIColor *tintColor UI_APPEARANCE_SELECTOR;
@property (nonatomic, retain) NSAttributedString *attributedTitle UI_APPEARANCE_SELECTOR; // May be used to indicate to the refreshControl that an external event has initiated the refresh action
- (void)beginRefreshing NS_AVAILABLE_IOS(6_0);
// Must be explicitly called when the refreshing has completed
- (void)endRefreshing NS_AVAILABLE_IOS(6_0); @end
使用介绍:http://www.devdiv.com/iOS_iPhone-ios_uirefreshcontrol_-thread-127741-1-1.html
UIRefreshControl的使用的更多相关文章
- AFNetworking 3.0 源码解读(十)之 UIActivityIndicatorView/UIRefreshControl/UIImageView + AFNetworking
我们应该看到过很多类似这样的例子:某个控件拥有加载网络图片的能力.但这究竟是怎么做到的呢?看完这篇文章就明白了. 前言 这篇我们会介绍 AFNetworking 中的3个UIKit中的分类.UIAct ...
- UIRefreshControl
在iOS6中UITableViewController 已经集成了UIRefreshControl 控件.UIRefreshControl目前只能用于UITableViewController
- UIRefreshControl自动刷新
不知道UIRefreshController是什么的朋友可以参考iOS6新特征:UIRefreshControl[下拉刷新]使用示例 一文了解这是什么,这里只提怎么使用代码的方式触发UIRefresh ...
- 新浪微博客户端(18)-集成下拉刷新控件UIRefreshControl
HomeViewController.m - (void)setupPullToRefreshView { UIRefreshControl *refreshControl = [[UIRefresh ...
- iOS - UIRefreshControl 刷新数据
前言 NS_CLASS_AVAILABLE_IOS(6_0) __TVOS_PROHIBITED @interface UIRefreshControl : UIControl 1.UIRefresh ...
- ios fix UIRefreshControl bug
NS_CLASS_AVAILABLE_IOS(6_0) UIRefreshControl 有个毛病有时会出bug 动画下拉就不动了,这里给出修复处理: @interface UICollecti ...
- UITableViewCell左滑的时候添加多个按钮的方法(iOS8+)以及UIRefreshControl(iOS6+)的使用。
之前想在cell左滑的时候添加更多的按钮而不是只有‘删除’按钮如下所示,貌似不是一件简单的事.但是现在只要实现几个方法就行了. 代码写的比较垃圾,重在理解这个知识.. . 具体代码: // // T ...
- iOS原生refresh(UIRefreshControl)
转载:http://www.2cto.com/kf/201504/392431.html // // ViewController.m // 代码自定义cell // // Created by ma ...
- 使用系统自带的 UIRefreshControl 实现下拉刷新
UIRefreshControl 为 UITableViewController 中的一个属性,从以下可以看出, IOS6.0 以上才支持. @property (nonatomic,retain) ...
随机推荐
- 【Leetcode】【Hard】Valid Number
Validate if a given string is numeric. Some examples:"0" => true" 0.1 " => ...
- 【译】UNIVERSAL IMAGE LOADER.PART 2---ImageLoaderConfiguration详解
ImageLoader类中包含了所有操作.他是一个单例,为了获取它的一个单一实例,你需要调用getInstance()方法.在使用ImageLoader来显示图片之前,你需要初始化它的配置-Image ...
- python time
Python-time 计算程序运行时间 import time start = time.clock() time.sleep(5) end = time.clock() runtime = end ...
- 自旋锁-SpinLock(.NET 4.0+)
短时间锁定的情况下,自旋锁(spinlock)更快.(因为自旋锁本质上不会让线程休眠,而是一直循环尝试对资源访问,直到可用.所以自旋锁线程被阻塞时,不进行线程上下文切换,而是空转等待.对于多核CPU而 ...
- spring三种实例化bean的方式
1构造函数实例化 2静态工厂方法实例化 3实例工厂方法实例化 service接口: package service; public interface PersonService { public v ...
- asp.net mvc 如何调用微信jssdk接口:分享到微信朋友(圈)| 分享到qq空间
如何在asp.net mvc 项目里, 调用微信jssdk接口,现实功能: 分享到微信朋友(圈)| 分享到qq空间 1 创建一个Action,准备一些数据,初始化数据(签名): /// <sum ...
- 在ASP.NET MVC5中建置以角色为基础的授权机制
在前一篇贴文中,已探索过如何在MVC5中自定ASP.NET Identity,接下来要来试试在MVC5中如何运用 ASP.NET Identity来设定一个以 "角色"为基础的授权 ...
- TF Boys (TensorFlow Boys ) 养成记(四)
前面基本上把 TensorFlow 的在图像处理上的基础知识介绍完了,下面我们就用 TensorFlow 来搭建一个分类 cifar10 的神经网络. 首先准备数据: cifar10 的数据集共有 6 ...
- 一些java面试题
1.SQL中的having子句用来干啥的? 答:having子句的功能是进行分组(GROUP BY)后的过滤 如:select id,avg(score) from 表 group by 学号 ha ...
- 在线教程的游戏化-20分钟做了个demo
首先,不准说做得撇,因为其一,我只用了20分钟不到:其二,第一次尝试,以前想过,但是一直没有搞过,二话不说,先来截图,下载地址在最下面. 因为第一次尝试,所以很多事件自己还没有闹明白,不过基本上还是看 ...