![(logo)](http://images.cnitblog.com/blog2015/497279/201505/051004492043385.png)
## MJRefresh
* An easy way to use pull-to-refresh
## Contents
* Getting Started
* [Features【Support what kinds of controls to refresh】](#Support_what_kinds_of_controls_to_refresh)
* [Installation【How to use MJRefresh】](#How_to_use_MJRefresh)
* [Who's using【More than hundreds of Apps are using MJRefresh】](#More_than_hundreds_of_Apps_are_using_MJRefresh)
* [Classes【The Class Structure Chart of MJRefresh】](#The_Class_Structure_Chart_of_MJRefresh)
* Comment API
* [MJRefreshComponent.h](#MJRefreshComponent.h)
* [MJRefreshHeader.h](#MJRefreshHeader.h)
* [MJRefreshFooter.h](#MJRefreshFooter.h)
* [MJRefreshAutoFooter.h](#MJRefreshAutoFooter.h)
* Examples
* [Reference](#Reference)
* [The drop-down refresh 01-Default](#The_drop-down_refresh_01-Default)
* [The drop-down refresh 02-Animation image](#The_drop-down_refresh_02-Animation_image)
* [The drop-down refresh 03-Hide the time](#The_drop-down_refresh_03-Hide_the_time)
* [The drop-down refresh 04-Hide status and time](#The_drop-down_refresh_04-Hide_status_and_time)
* [The drop-down refresh 05-DIY title](#The_drop-down_refresh_05-DIY_title)
* [The drop-down refresh 06-DIY the control of refresh](#The_drop-down_refresh_06-DIY_the_control_of_refresh)
* [The pull to refresh 01-Default](#The_pull_to_refresh_01-Default)
* [The pull to refresh 02-Animation image](#The_pull_to_refresh_02-Animation_image)
* [The pull to refresh 03-Hide the title of refresh status](#The_pull_to_refresh_03-Hide_the_title_of_refresh_status)
* [The pull to refresh 04-All loaded](#The_pull_to_refresh_04-All_loaded)
* [The pull to refresh 05-DIY title](#The_pull_to_refresh_05-DIY_title)
* [The pull to refresh 06-Hidden After loaded](#The_pull_to_refresh_06-Hidden_After_loaded)
* [The pull to refresh 07-Automatic back of the pull01](#The_pull_to_refresh_07-Automatic_back_of_the_pull01)
* [The pull to refresh 08-Automatic back of the pull02](#The_pull_to_refresh_08-Automatic_back_of_the_pull02)
* [The pull to refresh 09-DIY the control of refresh(Automatic refresh)](#The_pull_to_refresh_09-DIY_the_control_of_refresh(Automatic_refresh))
* [The pull to refresh 10-DIY the control of refresh(Automatic back)](#The_pull_to_refresh_10-DIY_the_control_of_refresh(Automatic_back))
* [UICollectionView01-The pull and drop-down refresh](#UICollectionView01-The_pull_and_drop-down_refresh)
* [UIWebView01-The drop-down refresh](#UIWebView01-The_drop-down_refresh)
* [Hope](#Hope)
## <a id="Support_what_kinds_of_controls_to_refresh"></a>Support what kinds of controls to refresh
* `UIScrollView`、`UITableView`、`UICollectionView`、`UIWebView`
## <a id="How_to_use_MJRefresh"></a>How to use MJRefresh
* Installation with CocoaPods:`pod 'MJRefresh'`
* Manual import:
* Drag All files in the `MJRefresh` folder to project
* Import the main file:`#import "MJRefresh.h"`
```objc
Base Custom
MJRefresh.bundle MJRefresh.h
MJRefreshConst.h MJRefreshConst.m
UIScrollView+MJExtension.h UIScrollView+MJExtension.m
UIScrollView+MJRefresh.h UIScrollView+MJRefresh.m
UIView+MJExtension.h UIView+MJExtension.m
```
## <a id="More_than_hundreds_of_Apps_are_using_MJRefresh"></a>More than hundreds of Apps are using MJRefresh
<img src="http://images0.cnblogs.com/blog2015/497279/201506/141212365041650.png" width="200" height="300">
* More information of App can focus on:[M了个J-博客园](http://www.cnblogs.com/mjios/p/4409853.html)
## <a id="The_Class_Structure_Chart_of_MJRefresh"></a>The Class Structure Chart of MJRefresh
![](http://images0.cnblogs.com/blog2015/497279/201506/132232456139177.png)
- `The class of red text` in the chart:You can use them directly
- The drop-down refresh control types
- Normal:`MJRefreshNormalHeader`
- Gif:`MJRefreshGifHeader`
- The pull to refresh control types
- Auto refresh
- Normal:`MJRefreshAutoNormalFooter`
- Gif:`MJRefreshAutoGifFooter`
- Auto Back
- Normal:`MJRefreshBackNormalFooter`
- Gif:`MJRefreshBackGifFooter`
- `The class of non-red text` in the chart:For inheritance,to use DIY the control of refresh
- About how to DIY the control of refresh,You can refer the Class in below Chart<br>
<img src="http://images0.cnblogs.com/blog2015/497279/201506/141358159107893.png" width="30%" height="30%">
## <a id="MJRefreshComponent.h"></a>MJRefreshComponent.h
```objc
/** The Base Class of refresh control */
@interface MJRefreshComponent : UIView
#pragma mark - Control the state of Refresh
/** BeginRefreshing */
- (void)beginRefreshing;
/** EndRefreshing */
- (void)endRefreshing;
/** IsRefreshing */
- (BOOL)isRefreshing;
#pragma mark - Other
/** According to the drag ratio to change alpha automatically */
@property (assign, nonatomic, getter=isAutomaticallyChangeAlpha) BOOL automaticallyChangeAlpha;
@end
```
## <a id="MJRefreshHeader.h"></a>MJRefreshHeader.h
```objc
@interface MJRefreshHeader : MJRefreshComponent
/** Creat header */
+ (instancetype)headerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock;
/** Creat header */
+ (instancetype)headerWithRefreshingTarget:(id)target refreshingAction:(SEL)action;
/** This key is used to storage the time that the last time of drown-down successfully */
@property (copy, nonatomic) NSString *lastUpdatedTimeKey;
/** The last time of drown-down successfully */
@property (strong, nonatomic, readonly) NSDate *lastUpdatedTime;
/** Ignored scrollView contentInset top */
@property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetTop;
@end
```
## <a id="MJRefreshFooter.h"></a>MJRefreshFooter.h
```objc
@interface MJRefreshFooter : MJRefreshComponent
/** Creat footer */
+ (instancetype)footerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock;
/** Creat footer */
+ (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action;
/** NoticeNoMoreData */
- (void)noticeNoMoreData;
/** ResetNoMoreData(Clear the status of NoMoreData ) */
- (void)resetNoMoreData;
/** Ignored scrollView contentInset bottom */
@property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetBottom;
/** Automaticlly show or hidden by the count of data(Show-have data,Hidden- no data) */
@property (assign, nonatomic) BOOL automaticallyHidden;
@end
```
## <a id="MJRefreshAutoFooter.h"></a>MJRefreshAutoFooter.h
```objc
@interface MJRefreshAutoFooter : MJRefreshFooter
/** Is Automatically Refresh(Default is Yes) */
@property (assign, nonatomic, getter=isAutomaticallyRefresh) BOOL automaticallyRefresh;
/** When there is much at the bottom of the control is automatically refresh(Default is 1.0,Is at the bottom of the control appears in full, will refresh automatically) */
@property (assign, nonatomic) CGFloat triggerAutomaticallyRefreshPercent;
@end
```
## <a id="Reference"></a>Reference
```objc
* Due to there are more functions of this framework,Don't write specific text describe its usage
* You can directly reference examples MJTableViewController、MJCollectionViewController、MJWebViewController,More intuitive and fast.
```
<img src="http://images0.cnblogs.com/blog2015/497279/201506/141345470048120.png" width="30%" height="30%">
## <a id="The_drop-down_refresh_01-Default"></a>The drop-down refresh 01-Default
```objc
self.tableView.header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
//Call this Block When enter the refresh status automatically
}];
或
// Set the callback(Once you enter the refresh status,then call the action of target,that is call [self loadNewData])
self.tableView.header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(loadNewData)];
// Enter the refresh status immediately
[self.tableView.header beginRefreshing]
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
项目背景 一款成人用品线上零售商城,在线销售男士、女士避孕用品、情趣内衣和玩具类等两性健康产品,客户有自己的货源为了扩大渠道,方便客户购买,开发本款小程序。 项目需求 产品分类清晰明了,首页需突出主打产品,页面展示产品清楚明了;购买流程不要繁琐;后期方便用户查看订单情况。有促销信息及优惠券可以提高刺激消费者 没有搭建教程,感兴趣的会员请下载自行研究。
资源推荐
资源详情
资源评论
收起资源包目录
新版JAVA开源成人用品零售商城APP源码 内含安卓IOS双端原生源码+小程序源码.rar (2021个子文件)
bootstrap.css 144KB
bootstrap.css 144KB
layui.css 59KB
layui.css 59KB
ueditor.css 44KB
font-awesome.css 37KB
font-awesome.css 37KB
font-awesome.css 37KB
ueditor.min.css 34KB
font-awesome.min.css 30KB
font-awesome.min.css 30KB
font-awesome.min.css 30KB
layui.css 27KB
video-js.css 21KB
_all.css 20KB
global.css 19KB
global.css 19KB
image.css 19KB
video.css 15KB
attachment.css 15KB
_all.css 14KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
_all.css 14KB
_all.css 12KB
video-js.min.css 11KB
layui.mobile.css 10KB
layui.mobile.css 10KB
layui.mobile.css 10KB
laydate.css 8KB
laydate.css 7KB
laydate.css 7KB
laydate.css 7KB
shCoreDefault.css 7KB
layer.css 5KB
layer.css 5KB
layer.css 5KB
layer.css 5KB
layer.css 5KB
layer.css 5KB
scrawl.css 4KB
diyUpload.css 3KB
diyUpload.css 3KB
layout.css 3KB
layout.css 3KB
codemirror.css 3KB
charts.css 3KB
background.css 2KB
yellow.css 2KB
purple.css 2KB
orange.css 2KB
green.css 2KB
pink.css 2KB
aero.css 2KB
blue.css 2KB
grey.css 2KB
red.css 2KB
line.css 2KB
emotion.css 2KB
dialogbase.css 2KB
music.css 2KB
icheck.css 2KB
purple.css 1KB
yellow.css 1KB
orange.css 1KB
orange.css 1KB
purple.css 1KB
yellow.css 1KB
green.css 1KB
green.css 1KB
pink.css 1KB
aero.css 1KB
grey.css 1KB
blue.css 1KB
pink.css 1KB
grey.css 1KB
blue.css 1KB
aero.css 1KB
red.css 1KB
red.css 1KB
minimal.css 1KB
login.css 1KB
login.css 1KB
polaris.css 1KB
square.css 1KB
begtable.css 1KB
begtable.css 1KB
purple.css 1KB
yellow.css 1KB
orange.css 1KB
green.css 1KB
blue.css 1KB
pink.css 1KB
共 2021 条
- 1
- 2
- 3
- 4
- 5
- 6
- 21
资源评论
小正太浩二
- 粉丝: 184
- 资源: 5908
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 嵌入式基础学习资料0000
- content_1714465331721.xls
- HM3401-VB一款P-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- Chainbase+Web3+APi+Data warehouse
- HM3401D-VB一款P-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- GEE案例-1990-2023年计算某个区域的NDVI时序变化轨迹(以徐州市为例)含全部代码.pdf
- HM3401C-VB一款P-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 沈丘盛世龙门图纸符合规范化
- 基于51单片机带LCD1602显示+温度补偿的超声波测距仪设计软硬设计+仿真+文档资料.zip
- 一、K210是什么? K210全称为堪智K210,是嘉楠科技自主研发的一款采用RISC-V处理器架构,具备视听一体、自主IP内核
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功