- (void)refresh {
MJRefreshGifHeader *header = [MJRefreshGifHeader headerWithRefreshingTarget:self refreshingAction:@selector(getData)];
NSMutableArray *images = [NSMutableArray array];
for (int i = ; i < ; i++) {
UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"Load_%d", i]];
[images addObject:image];
}
// Set the ordinary state of animated images
[header setImages:images forState:MJRefreshStateIdle];
// Set the pulling state of animated images(Enter the status of refreshing as soon as loosen)
[header setImages:images forState:MJRefreshStatePulling];
// Set the refreshing state of animated images
[header setImages:images forState:MJRefreshStateRefreshing];
header.lastUpdatedTimeLabel.hidden = YES;
header.stateLabel.hidden = YES;
// Set header
self.tableview.mj_header = header;
}

iOS -- MJrefresh的更多相关文章

  1. iOS MJRefresh下拉、上拉刷新自定义以及系统详细讲解

    更新: MJRefresh 更新功能,默认根据数据来源 自动显示 隐藏footer,这个功能可以关闭 DoctorTableView.mj_footer.automaticallyHidden = N ...

  2. iOS MJRefresh设置MJRefreshStateNoMoreData状态图片

    MJRefresh地址 //  代码地址: https://github.com/CoderMJLee/MJRefresh//  代码地址: http://code4app.com/ios/%E5%B ...

  3. iOS MJRefresh下拉刷新(上拉加载)使用详解

    下拉刷新控件目前比较火的有好几种,本人用过MJRefresh 和 SVPullToRefresh,相对而言,前者比后者可定制化.拓展新都更高一点. 因此本文着重讲一下MJRefresh的简单用法. 导 ...

  4. iOS MJRefresh上拉加载更多

    1.导入MJRefresh包 2.在类中引入:#import "MJRefresh.h" 3.添加footerView 添加加载更多的UI样式: MJRefreshAutoNorm ...

  5. iOS MJRefresh的使用 (列表上拉加载更多)

    pod 'MJRefresh' import MJRefresh 加载更多 let footView = MJRefreshAutoNormalFooter(refreshingBlock:{ //去 ...

  6. IOS学习8——常用框架学习汇总

    我们在学习和code过程中经常会用到一些框架,本文将会持续更新最新学习和用到的框架 布局框架: Masonry介绍与使用实践:快速上手Autolayout iOS MJRefresh下拉.上拉刷新自定 ...

  7. iOS刷新第三方MJRefresh的基本使用

    iOS开发中最好用的刷新第三方框架 MJRefresh GitHub : https://github.com/CoderMJLee/MJRefresh UIRefreshControl的介绍 1,U ...

  8. [iOS]一行代码集成空白页面占位图(基于runtime+MJRefresh思想)

    2018年01月03日阅读 2472   [iOS]一行代码集成空白页面占位图(基于runtime+MJRefresh思想) LYEmptyView 此框架是本人在5,6个月前,公司启动新项目的时候, ...

  9. iOS开发--常用技巧 (MJRefresh详解)

         iOS开发--常用技巧 (MJRefresh详解) https://github.com/CoderMJLee/MJRefresh 下拉刷新01-默认 self.tableView.head ...

随机推荐

  1. android setLayoutParams 问题,出错

    LinearLayout layt = (LinearLayout) rootView.findViewById(R.id.llt_2); FrameLayout.LayoutParams layou ...

  2. 使用自定义setTimeout和setInterval使之可以传递参数和对象参数

    转载自http://www.jb51.net/article/17859.htm /****************************************************** //  ...

  3. Server Tomcat v7.0 Server at localhost failed to start.临时解决办法

    错误名:Server Tomcat v7.0 Server at localhost failed to start. 解决办法:去掉下面这句话: (通常在代码开头部分,public class前) ...

  4. ConcurrentHashMap是如何提高并发时的吞吐性能

    为并发吞吐性能所做的优化 ConcurrentHashMap使用了一些技巧来获取高的并发性能,同时避免了锁.这些技巧包括: 为不同的Hash bucket(所谓hash bucket即不同范围的key ...

  5. NOIP1999 旅行家的预算

    题目描述 一个旅行家想驾驶汽车以最少的费用从一个城市到另一个城市(假设出发时油箱是空的).给定两个城市之间的距离D1.汽车油箱的容量C(以升为单位).每升汽油能行驶的距离D2.出发点每升汽油价格P和沿 ...

  6. 实用js函数收集

    1. 全选复选框: //复选框全选函数 function SelectAll() { var checkAll = document.getElementsByName("checkAll& ...

  7. JQuery常用方法(均实践过)

    1,使用jquery修改html元素的值 a,修改form的action的值(即修改html的属性值) 这个可以扩展为修改html元素的属性值的方法,使用的$("#id").att ...

  8. QT 常用控件二

    QT提供QHBoxLayout类.QVBoxlayout类及QGridLayout类等的基本布局管理,分别是水平排列布局,垂直排列布局和网格排列布局 addWidget()方法用于向布局中加入需要布局 ...

  9. Jboss EAP:native management API学习

    上一节已经学习了CLI命令行来控制JBOSS,如果想在程序中以编码方式来控制JBOSS,可以参考下面的代码,实际上在前面的文章,用代码控制Jboss上的DataSource,已经有所接触了,API与C ...

  10. mac:在当前文件夹打开terminal终端

    System Preferences -> Keyboard -> Shortcuts -> Services -> New Terminal at Folders/New T ...