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) ...
随机推荐
- SQL Server中DateTime与DateTime2的区别
DateTime字段类型对应的时间格式是 yyyy-MM-dd HH:mm:ss.fff ,3个f,精确到1毫秒(ms),示例 -- ::15.433 . DateTime2字段类型对应的时间格式是 ...
- 解读SQL Server 2014可更新列存储索引——存储机制
概述 SQL Server 2014被号称是微软数据库的一个革命性版本,其性能的提升的幅度是有史以来之最. 可更新的列存储索引作为SQL Server 2014的一个关键功能之一,在提升数据库的查询性 ...
- jQuery Mobile + HTML5
最近项目需要,需要构建一个适合手持设备访问的站点,作者从网上查阅了一些资料,本文就是基于此而来. 首先下载jQuery Mobile http://jquerymobile.com/,选择稳定版即可. ...
- 最新 Windows 10 应用项目模板发布
以下是最新的Visual Studio 2015 Windows 10 应用程序模板. Windows 10中几乎所有的官方应用都遵循这样一个设计模板:在左上方有一个所谓的导航栏.点击该导航按钮,左侧 ...
- JSPatch中的OC高级语法
1)多线程相关 dispatch_after dispatch_async dispatch_sync dispatch_get_main_queue dispatch_get_global_queu ...
- crossplatform---Node.js Applications with VS Code
Node.js is a platform for building fast and scalable server applications using JavaScript. Node.js i ...
- Why we need model on Django ?
step01: create a database name as (django_db) on mysql ... step02: configure your django to use the ...
- 记忆化搜索hdu1078 dfs
http://acm.hdu.edu.cn/showproblem.php?pid=1078 题意:给出n*n的格子,每个各自里面有些食物,问一只老鼠每次走最多k步所能吃到的最多的食物 #includ ...
- com.android.org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate: current time:
http://www.cnblogs.com/mayongsheng/p/4387109.html https://github.com/awslabs/aws-sdk-android-samples ...
- Android 使用Fragment界面向下跳转并一级级返回
http://www.cnblogs.com/_ymw/p/4227862.html 1.首先贴上项目结构图: 2.先添加一个接口文件BackHandledInterface.java,定义一个set ...