![(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 beginRefres
没有合适的资源?快使用搜索试试~ 我知道了~
一个基于Swift开发的美团高仿APP-毕业设计
共1776个文件
png:1286个
h:141个
swift:104个
需积分: 5 0 下载量 32 浏览量
2024-05-12
13:04:14
上传
评论 1
收藏 21.33MB ZIP 举报
温馨提示
一个基于Swift开发的美团高仿APP——毕业设计 、概述 这只一个基于Swift开发的美团高仿项目,旨在学习练习Swift在iOS开发的应用,已经实现了有意义部分的大多数功能,数据均来自美团的开放平台。 这个项目涵盖了iOS开发所涉及的大多数功能和技巧,当然,由于非正式开发,有些部分做的有些粗糙,不过,很多部分还是值得借鉴。 内部的网络加载使用的NSOperation,集成AF和SD以及MJ等大多主流第三方库,还是采用MVC设计模式,Model采用主流的JsonExport来创建,方便又快捷。 还实现了二维码扫描的功能,当然参考大神了教程,然后采用Swift翻译和更加Swift2.0进行调整。 由于Swift中的enum和struct非常强大,苹果公司也在推从使用Struct来替代部分class,所以,本app在部分功能上采用的struct或enum来实现,更加的快捷 和轻量化。 本APP使用xcode7.3.1,pod iOS 最低版本为9.0,语言Swift2.3。(其实是从xcode7.2.1(Swift2.0)升到xcode7.3.1(Swift2.3), xcode8.0
资源推荐
资源详情
资源评论
收起资源包目录
一个基于Swift开发的美团高仿APP-毕业设计 (1776个子文件)
BaiduMapAPI_Base 8.41MB
BaiduMapAPI_Cloud 808KB
BaiduMapAPI_Location 201KB
BaiduMapAPI_Map 23.31MB
BaiduMapAPI_Radar 710KB
BaiduMapAPI_Search 8.9MB
BaiduMapAPI_Utils 2.36MB
DVDirectory_Retina.cfg 68KB
DVDirectory.cfg 68KB
DVHotMap.cfg 11KB
DVHotMap_Retina.cfg 11KB
DVIndoor.cfg 11KB
DVSDirectory_Retina.cfg 5KB
DVSDirectory.cfg 5KB
DVHotcity_Retina.cfg 2KB
DVHotcity.cfg 2KB
DVVersion_Retina.cfg 349B
DVVersion.cfg 341B
channel 5B
CodeResources 422KB
CustomIndex 4KB
.gitignore 42B
Beijing, China.gpx 166B
BMKVersion.h 48KB
AFURLSessionManager.h 29KB
BMKMapView.h 24KB
AFURLRequestSerialization.h 22KB
AFHTTPSessionManager.h 19KB
BMKGeometry.h 13KB
BMKRouteSearchType.h 13KB
UIButton+WebCache.h 13KB
AFURLResponseSerialization.h 12KB
SDWebImageManager.h 11KB
UIImageView+WebCache.h 10KB
UIButton+AFNetworking.h 10KB
AFImageDownloader.h 9KB
SDImageCache.h 9KB
AFNetworkReachabilityManager.h 8KB
BMKOverlayView.h 8KB
BMKPoiSearchType.h 7KB
SDWebImageDownloader.h 7KB
UIImageView+AFNetworking.h 6KB
AFSecurityPolicy.h 6KB
AFAutoPurgingImageCache.h 6KB
BMKTypes.h 5KB
AFNetworkActivityIndicatorManager.h 5KB
UIImageView+HighlightedWebCache.h 5KB
UIWebView+AFNetworking.h 4KB
SDWebImageDownloaderOperation.h 4KB
MJRefreshComponent.h 4KB
BMKLocationService.h 4KB
SDWebImagePrefetcher.h 4KB
BMKAnnotationView.h 4KB
BMKPolyline.h 4KB
BMKOfflineMap.h 3KB
BMKCloudSearchInfo.h 3KB
BMKPoiSearch.h 3KB
BMKCloudSearch.h 3KB
BMKRouteSearch.h 3KB
BMKRadarManager.h 3KB
BMKShareURLSearch.h 3KB
MJRefreshConst.h 2KB
BMKCloudPOIList.h 2KB
UIProgressView+AFNetworking.h 2KB
BMKPoiSearchOption.h 2KB
BMKTileLayer.h 2KB
BMKNavigation.h 2KB
BMKOverlayPathView.h 2KB
BMKGroundOverlay.h 2KB
BMKDistrictSearch.h 2KB
UIRefreshControl+AFNetworking.h 2KB
UIActivityIndicatorView+AFNetworking.h 2KB
BMKShareUrlSearchOption.h 2KB
BMKRadarOption.h 2KB
BMKOfflineMapType.h 2KB
BMKRadarResult.h 2KB
SDWebImageCompat.h 2KB
BMKSuggestionSearch.h 2KB
BMKRouteSearchOption.h 2KB
UIKit+AFNetworking.h 2KB
BMKGeocodeSearch.h 2KB
BMKCircle.h 2KB
Bridging_Header.h 2KB
BMKGeocodeType.h 2KB
AFNetworking.h 2KB
BMKFavPoiManager.h 2KB
BMKOpenRouteOption.h 1KB
BMKPolygon.h 1KB
UIImage+AFNetworking.h 1KB
BMKOverlayGLBasicView.h 1KB
BMKOpenRoute.h 1KB
MJRefreshFooter.h 1KB
BMKBusLineSearch.h 1KB
BMKMapManager.h 1KB
BMKHeatMap.h 1KB
BMKArcline.h 1KB
BMKMapStatus.h 1KB
MJRefreshHeader.h 1KB
BMKOpenPanorama.h 1KB
UIScrollView+MJRefresh.h 1KB
共 1776 条
- 1
- 2
- 3
- 4
- 5
- 6
- 18
资源评论
程序媛小y
- 粉丝: 5618
- 资源: 199
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功