{"id":2714,"url":"https://github.com/CoderMJLee/MJRefresh","last_synced_at":"2025-08-03T00:32:29.095Z","repository":{"id":17334925,"uuid":"20106153","full_name":"CoderMJLee/MJRefresh","owner":"CoderMJLee","description":"An easy way to use pull-to-refresh.","archived":false,"fork":false,"pushed_at":"2024-03-26T09:04:51.000Z","size":15420,"stargazers_count":13801,"open_issues_count":55,"forks_count":3552,"subscribers_count":445,"default_branch":"master","last_synced_at":"2024-10-29T11:30:33.769Z","etag":null,"topics":["objective-c","refresh"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CoderMJLee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2014-05-23T16:22:32.000Z","updated_at":"2024-10-27T06:55:17.000Z","dependencies_parsed_at":"2022-06-26T03:43:56.066Z","dependency_job_id":"b525503c-3cbc-4fbc-b65e-da571780ba1b","html_url":"https://github.com/CoderMJLee/MJRefresh","commit_stats":{"total_commits":341,"total_committers":65,"mean_commits":5.246153846153846,"dds":0.5542521994134897,"last_synced_commit":"e8a5c77417bd9f8a181bcb250f4892ce97100f08"},"previous_names":[],"tags_count":111,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderMJLee%2FMJRefresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderMJLee%2FMJRefresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderMJLee%2FMJRefresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderMJLee%2FMJRefresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CoderMJLee","download_url":"https://codeload.github.com/CoderMJLee/MJRefresh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227590121,"owners_count":17790446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["objective-c","refresh"],"created_at":"2024-01-05T20:16:20.911Z","updated_at":"2024-12-06T18:30:43.277Z","avatar_url":"https://github.com/CoderMJLee.png","language":"Objective-C","readme":"## MJRefresh\n[![SPM supported](https://img.shields.io/badge/SPM-supported-4BC51D.svg?style=flat)](https://github.com/apple/swift-package-manager)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![podversion](https://img.shields.io/cocoapods/v/MJRefresh.svg)](https://cocoapods.org/pods/MJRefresh)\n\n* An easy way to use pull-to-refresh\n\n[📜✍🏻**Release Notes**: more details](https://github.com/CoderMJLee/MJRefresh/releases)\n\n## Contents\n\n- New Features\n    - [Support Flips in CollectionViewLayout](#SupportFlipsInCollectionViewLayout)\n    - [Dynamic i18n Switching](#dynamic_i18n_switching)\n    - [SPM Supported](#spm_supported)\n    - [Swift Chaining Grammar Supported](#swift_chaining_grammar_supported)\n\n* Getting Started\n    * [Features【Support what kinds of controls to refresh】](#Support_what_kinds_of_controls_to_refresh)\n    * [Installation【How to use MJRefresh】](#How_to_use_MJRefresh)\n    * [Who's using【More than hundreds of Apps are using MJRefresh】](#More_than_hundreds_of_Apps_are_using_MJRefresh)\n    * [Classes【The Class Structure Chart of MJRefresh】](#The_Class_Structure_Chart_of_MJRefresh)\n* Comment API\n\t* [MJRefreshComponent.h](#MJRefreshComponent.h)\n\t* [MJRefreshHeader.h](#MJRefreshHeader.h)\n\t* [MJRefreshFooter.h](#MJRefreshFooter.h)\n\t* [MJRefreshAutoFooter.h](#MJRefreshAutoFooter.h)\n\t* [MJRefreshTrailer.h](#MJRefreshTrailer.h)\n* Examples\n    * [Reference](#Reference)\n    * [The drop-down refresh 01-Default](#The_drop-down_refresh_01-Default)\n    * [The drop-down refresh 02-Animation image](#The_drop-down_refresh_02-Animation_image)\n    * [The drop-down refresh 03-Hide the time](#The_drop-down_refresh_03-Hide_the_time)\n    * [The drop-down refresh 04-Hide status and time](#The_drop-down_refresh_04-Hide_status_and_time)\n    * [The drop-down refresh 05-DIY title](#The_drop-down_refresh_05-DIY_title)\n    * [The drop-down refresh 06-DIY the control of refresh](#The_drop-down_refresh_06-DIY_the_control_of_refresh)\n    * [The pull to refresh 01-Default](#The_pull_to_refresh_01-Default)\n    * [The pull to refresh 02-Animation image](#The_pull_to_refresh_02-Animation_image)\n    * [The pull to refresh 03-Hide the title of refresh status](#The_pull_to_refresh_03-Hide_the_title_of_refresh_status)\n    * [The pull to refresh 04-All loaded](#The_pull_to_refresh_04-All_loaded)\n    * [The pull to refresh 05-DIY title](#The_pull_to_refresh_05-DIY_title)\n    * [The pull to refresh 06-Hidden After loaded](#The_pull_to_refresh_06-Hidden_After_loaded)\n    * [The pull to refresh 07-Automatic back of the pull01](#The_pull_to_refresh_07-Automatic_back_of_the_pull01)\n    * [The pull to refresh 08-Automatic back of the pull02](#The_pull_to_refresh_08-Automatic_back_of_the_pull02)\n    * [The pull to refresh 09-DIY the control of refresh(Automatic refresh)](#The_pull_to_refresh_09-DIY_the_control_of_refresh(Automatic_refresh))\n    * [The pull to refresh 10-DIY the control of refresh(Automatic back)](#The_pull_to_refresh_10-DIY_the_control_of_refresh(Automatic_back))\n    * [UICollectionView01-The pull and drop-down refresh](#UICollectionView01-The_pull_and_drop-down_refresh)\n    * [UICollectionView02-The trailer refresh](#UICollectionView02-The_trailer_refresh)\n    * [WKWebView01-The drop-down refresh](#WKWebView01-The_drop-down_refresh)\n* [Hope](#Hope)\n\n## New Features\n\n### \u003ca id=\"SupportFlipsInCollectionViewLayout\"\u003e\u003c/a\u003eSupport Flips In CollectionViewLayout\n\n\u003e Refer to [issue #1616](https://github.com/CoderMJLee/MJRefresh/issues/1616).\n- Use `additionalFlipsViews` to append views that need to flip when collectionViewLayout flipsHorizontallyInOppositeLayoutDirection is `true`.\n- Use `flipsHorizontallyInOppositeLayoutDirectionViews` to modify views as the same way above. **⚠️ BUT parent class may be affected. Use `additionalFlipsViews` instead.**\n\n### \u003ca id=\"dynamic_i18n_switching\"\u003e\u003c/a\u003eDynamic i18n Switching\n\nNow `MJRefresh components` will be rerendered automatically with `MJRefreshConfig.default.language` setting.\n\n#### Example\n\nGo `i18n` folder and see lots of cases. Simulator example is behind `i18n tab` in right-top corner.\n\n#### Setting language\n\n```swift\nMJRefreshConfig.default.language = \"zh-hans\"\n```\n\n#### Setting i18n file name\n\n```swift\nMJRefreshConfig.default.i18nFilename = \"i18n File Name(not include type\u003c.strings\u003e)\"\n```\n\n#### Setting i18n language bundle\n\n```swift\nMJRefreshConfig.default.i18nBundle = \u003ci18n Bundle\u003e\n```\n\n#### Adopting the feature in your DIY component\n\n1. Just override `i18nDidChange` function and reset texts.\n\n```swift\n// must use this localization methods\nBundle.mj_localizedString(forKey: \"\")\n// or\nBundle.mj_localizedString(forKey: \"\", value:\"\")\n\noverride func i18nDidChange() {\n    // Reset texts function\n    setupTexts()\n    // Make sure to call super after resetting texts. It will call placeSubViews for applying new layout.\n    super.i18nDidChange()\n}\n```\n\n2. Receiving `MJRefreshDidChangeLanguageNotification` notification.\n\n### \u003ca id=\"spm_supported\"\u003e\u003c/a\u003eSPM Supported\n\nReleased from [`3.7.1`](https://github.com/CoderMJLee/MJRefresh/releases/tag/3.7.1)\n\n### \u003ca id=\"swift_chaining_grammar_supported\"\u003e\u003c/a\u003eSwift Chaining Grammar Supported\n\n```swift\n  // Example as MJRefreshNormalHeader\n  func addRefreshHeader() {\n      MJRefreshNormalHeader { [weak self] in\n  \t  // load some data\n      }.autoChangeTransparency(true)\n      .link(to: tableView)\n  }\n```\n\n## \u003ca id=\"Support_what_kinds_of_controls_to_refresh\"\u003e\u003c/a\u003eSupport what kinds of controls to refresh\n\n* `UIScrollView`、`UITableView`、`UICollectionView`、`WKWebView`\n\n## \u003ca id=\"How_to_use_MJRefresh\"\u003e\u003c/a\u003eHow to use MJRefresh\n* Installation with CocoaPods：`pod 'MJRefresh'`\n* Installation with [Carthage](https://github.com/Carthage/Carthage)：`github \"CoderMJLee/MJRefresh\"`\n* Manual import：\n    * Drag All files in the `MJRefresh` folder to project\n    * Import the main file：`#import \"MJRefresh.h\"`\n\n```objc\nBase                        Custom\nMJRefresh.bundle            MJRefresh.h\nMJRefreshConst.h            MJRefreshConst.m\nUIScrollView+MJExtension.h  UIScrollView+MJExtension.m\nUIScrollView+MJRefresh.h    UIScrollView+MJRefresh.m\nUIView+MJExtension.h        UIView+MJExtension.m\n```\n\n## \u003ca id=\"More_than_hundreds_of_Apps_are_using_MJRefresh\"\u003e\u003c/a\u003eMore than hundreds of Apps are using MJRefresh\n\u003cimg src=\"http://images0.cnblogs.com/blog2015/497279/201506/141212365041650.png\" width=\"200\" height=\"300\"\u003e\n* More information of App can focus on：[M了个J-博客园](http://www.cnblogs.com/mjios/p/4409853.html)\n\n## \u003ca id=\"The_Class_Structure_Chart_of_MJRefresh\"\u003e\u003c/a\u003eThe Class Structure Chart of MJRefresh\n![](http://images0.cnblogs.com/blog2015/497279/201506/132232456139177.png)\n- `The class of red text` in the chart：You can use them directly\n    - The drop-down refresh control types\n        - Normal：`MJRefreshNormalHeader`\n        - Gif：`MJRefreshGifHeader`\n    - The pull to refresh control types\n        - Auto refresh\n            - Normal：`MJRefreshAutoNormalFooter`\n            - Gif：`MJRefreshAutoGifFooter`\n        - Auto Back\n            - Normal：`MJRefreshBackNormalFooter`\n            - Gif：`MJRefreshBackGifFooter`\n    \n- `The class of non-red text` in the chart：For inheritance，to use DIY the control of refresh\n\n- About how to DIY the control of refresh，You can refer the Class in below Chart\u003cbr\u003e\n\n  \u003cimg src=\"http://images0.cnblogs.com/blog2015/497279/201506/141358159107893.png\" width=\"30%\" height=\"30%\"\u003e\n\n## \u003ca id=\"MJRefreshComponent.h\"\u003e\u003c/a\u003eMJRefreshComponent.h\n```objc\n/** The Base Class of refresh control */\n@interface MJRefreshComponent : UIView\n#pragma mark -  Control the state of Refresh \n\n/** BeginRefreshing */\n- (void)beginRefreshing;\n/** EndRefreshing */\n- (void)endRefreshing; \n/** IsRefreshing */\n- (BOOL)isRefreshing;\n\n#pragma mark - Other\n/** According to the drag ratio to change alpha automatically */\n@property (assign, nonatomic, getter=isAutomaticallyChangeAlpha) BOOL automaticallyChangeAlpha;\n@end\n```\n\n## \u003ca id=\"MJRefreshHeader.h\"\u003e\u003c/a\u003eMJRefreshHeader.h\n```objc\n@interface MJRefreshHeader : MJRefreshComponent\n/** create header */\n+ (instancetype)headerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock;\n/** create header */\n+ (instancetype)headerWithRefreshingTarget:(id)target refreshingAction:(SEL)action;\n\n/** This key is used to storage the time that the last time of drown-down successfully */\n@property (copy, nonatomic) NSString *lastUpdatedTimeKey;\n/** The last time of drown-down successfully */\n@property (strong, nonatomic, readonly) NSDate *lastUpdatedTime;\n\n/** Ignored scrollView contentInset top */\n@property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetTop;\n@end\n```\n\n## \u003ca id=\"MJRefreshFooter.h\"\u003e\u003c/a\u003eMJRefreshFooter.h\n```objc\n@interface MJRefreshFooter : MJRefreshComponent\n/** create footer */\n+ (instancetype)footerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock;\n/** create footer */\n+ (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action;\n\n/** NoticeNoMoreData */\n- (void)noticeNoMoreData;\n/** ResetNoMoreData（Clear the status of NoMoreData ） */\n- (void)resetNoMoreData;\n\n/** Ignored scrollView contentInset bottom */\n@property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetBottom;\n@end\n```\n\n## \u003ca id=\"MJRefreshAutoFooter.h\"\u003e\u003c/a\u003eMJRefreshAutoFooter.h\n```objc\n@interface MJRefreshAutoFooter : MJRefreshFooter\n/** Is Automatically Refresh(Default is Yes) */\n@property (assign, nonatomic, getter=isAutomaticallyRefresh) BOOL automaticallyRefresh;\n\n/** 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) */\n@property (assign, nonatomic) CGFloat triggerAutomaticallyRefreshPercent;\n@end\n```\n\n## \u003ca id=\"MJRefreshTrailer.h\"\u003e\u003c/a\u003e MJRefreshTrailer.h\n```objc\n@interface MJRefreshTrailer : MJRefreshComponent\n\n/** 创建trailer */\n+ (instancetype)trailerWithRefreshingBlock:(MJRefreshComponentAction)refreshingBlock;\n/** 创建trailer */\n+ (instancetype)trailerWithRefreshingTarget:(id)target refreshingAction:(SEL)action;\n\n/** 忽略多少scrollView的contentInset的right */\n@property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetRight;\n\n@end\n```\n\n## \u003ca id=\"Reference\"\u003e\u003c/a\u003eReference\n```objc\n* Due to there are more functions of this framework，Don't write specific text describe its usage\n* You can directly reference examples MJTableViewController、MJCollectionViewController、MJWebViewController，More intuitive and fast.\n```\n\u003cimg src=\"http://images0.cnblogs.com/blog2015/497279/201506/141345470048120.png\" width=\"30%\" height=\"30%\"\u003e\n\n## \u003ca id=\"The_drop-down_refresh_01-Default\"\u003e\u003c/a\u003eThe drop-down refresh 01-Default\n\n```objc\nself.tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{\n   //Call this Block When enter the refresh status automatically \n}];\n或\n// Set the callback（Once you enter the refresh status，then call the action of target，that is call [self loadNewData]）\nself.tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(loadNewData)];\n\n// Enter the refresh status immediately\n[self.tableView.mj_header beginRefreshing];\n```\n![(下拉刷新01-普通)](http://images0.cnblogs.com/blog2015/497279/201506/141204343486151.gif)\n\n## \u003ca id=\"The_drop-down_refresh_02-Animation_image\"\u003e\u003c/a\u003eThe drop-down refresh 02-Animation image\n```objc\n// Set the callback（一Once you enter the refresh status，then call the action of target，that is call [self loadNewData]）\nMJRefreshGifHeader *header = [MJRefreshGifHeader headerWithRefreshingTarget:self refreshingAction:@selector(loadNewData)];\n// Set the ordinary state of animated images\n[header setImages:idleImages forState:MJRefreshStateIdle];\n// Set the pulling state of animated images（Enter the status of refreshing as soon as loosen）\n[header setImages:pullingImages forState:MJRefreshStatePulling];\n// Set the refreshing state of animated images\n[header setImages:refreshingImages forState:MJRefreshStateRefreshing];\n// Set header\nself.tableView.mj_header = header;\n```\n![(下拉刷新02-动画图片)](http://images0.cnblogs.com/blog2015/497279/201506/141204402238389.gif)\n\n## \u003ca id=\"The_drop-down_refresh_03-Hide_the_time\"\u003e\u003c/a\u003eThe drop-down refresh 03-Hide the time\n```objc\n// Hide the time\nheader.lastUpdatedTimeLabel.hidden = YES;\n```\n![(下拉刷新03-隐藏时间)](http://images0.cnblogs.com/blog2015/497279/201506/141204456132944.gif)\n\n## \u003ca id=\"The_drop-down_refresh_04-Hide_status_and_time\"\u003e\u003c/a\u003eThe drop-down refresh 04-Hide status and time\n```objc\n// Hide the time\nheader.lastUpdatedTimeLabel.hidden = YES;\n\n// Hide the status\nheader.stateLabel.hidden = YES;\n```\n![(下拉刷新04-隐藏状态和时间0)](http://images0.cnblogs.com/blog2015/497279/201506/141204508639539.gif)\n\n## \u003ca id=\"The_drop-down_refresh_05-DIY_title\"\u003e\u003c/a\u003eThe drop-down refresh 05-DIY title\n```objc\n// Set title\n[header setTitle:@\"Pull down to refresh\" forState:MJRefreshStateIdle];\n[header setTitle:@\"Release to refresh\" forState:MJRefreshStatePulling];\n[header setTitle:@\"Loading ...\" forState:MJRefreshStateRefreshing];\n\n// Set font\nheader.stateLabel.font = [UIFont systemFontOfSize:15];\nheader.lastUpdatedTimeLabel.font = [UIFont systemFontOfSize:14];\n\n// Set textColor\nheader.stateLabel.textColor = [UIColor redColor];\nheader.lastUpdatedTimeLabel.textColor = [UIColor blueColor];\n```\n![(下拉刷新05-自定义文字)](http://images0.cnblogs.com/blog2015/497279/201506/141204563633593.gif)\n\n## \u003ca id=\"The_drop-down_refresh_06-DIY_the_control_of_refresh\"\u003e\u003c/a\u003eThe drop-down refresh 06-DIY the control of refresh\n```objc\nself.tableView.mj_header = [MJDIYHeader headerWithRefreshingTarget:self refreshingAction:@selector(loadNewData)];\n// Implementation reference to MJDIYHeader.h和MJDIYHeader.m\n```\n![(下拉刷新06-自定义刷新控件)](http://images0.cnblogs.com/blog2015/497279/201506/141205019261159.gif)\n\n## \u003ca id=\"The_pull_to_refresh_01-Default\"\u003e\u003c/a\u003eThe pull to refresh 01-Default\n```objc\nself.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{\n    //Call this Block When enter the refresh status automatically\n}];\n或\n// Set the callback（Once you enter the refresh status，then call the action of target，that is call [self loadMoreData]）\nself.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];\n```\n![(上拉刷新01-默认)](http://images0.cnblogs.com/blog2015/497279/201506/141205090047696.gif)\n\n## \u003ca id=\"The_pull_to_refresh_02-Animation_image\"\u003e\u003c/a\u003eThe pull to refresh 02-Animation image\n```objc\n// Set the callback（Once you enter the refresh status，then call the action of target，that is call [self loadMoreData]）\nMJRefreshAutoGifFooter *footer = [MJRefreshAutoGifFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];\n\n// Set the refresh image\n[footer setImages:refreshingImages forState:MJRefreshStateRefreshing];\n\n// Set footer\nself.tableView.mj_footer = footer;\n```\n![(上拉刷新02-动画图片)](http://images0.cnblogs.com/blog2015/497279/201506/141205141445793.gif)\n\n## \u003ca id=\"The_pull_to_refresh_03-Hide_the_title_of_refresh_status\"\u003e\u003c/a\u003eThe pull to refresh 03-Hide the title of refresh status\n```objc\n// Hide the title of refresh status\nfooter.refreshingTitleHidden = YES;\n// If does have not above method，then use footer.stateLabel.hidden = YES;\n```\n![(上拉刷新03-隐藏刷新状态的文字)](http://images0.cnblogs.com/blog2015/497279/201506/141205200985774.gif)\n\n## \u003ca id=\"The_pull_to_refresh_04-All_loaded\"\u003e\u003c/a\u003eThe pull to refresh 04-All loaded\n```objc\n//Become the status of NoMoreData\n[footer noticeNoMoreData];\n```\n![(上拉刷新04-全部加载完毕)](http://images0.cnblogs.com/blog2015/497279/201506/141205248634686.gif)\n\n## \u003ca id=\"The_pull_to_refresh_05-DIY_title\"\u003e\u003c/a\u003eThe pull to refresh 05-DIY title\n```objc\n// Set title\n[footer setTitle:@\"Click or drag up to refresh\" forState:MJRefreshStateIdle];\n[footer setTitle:@\"Loading more ...\" forState:MJRefreshStateRefreshing];\n[footer setTitle:@\"No more data\" forState:MJRefreshStateNoMoreData];\n\n// Set font\nfooter.stateLabel.font = [UIFont systemFontOfSize:17];\n\n// Set textColor\nfooter.stateLabel.textColor = [UIColor blueColor];\n```\n![(上拉刷新05-自定义文字)](http://images0.cnblogs.com/blog2015/497279/201506/141205295511153.gif)\n\n## \u003ca id=\"The_pull_to_refresh_06-Hidden_After_loaded\"\u003e\u003c/a\u003eThe pull to refresh 06-Hidden After loaded\n```objc\n//Hidden current control of the pull to refresh\nself.tableView.mj_footer.hidden = YES;\n```\n![(上拉刷新06-加载后隐藏)](http://images0.cnblogs.com/blog2015/497279/201506/141205343481821.gif)\n\n## \u003ca id=\"The_pull_to_refresh_07-Automatic_back_of_the_pull01\"\u003e\u003c/a\u003eThe pull to refresh 07-Automatic back of the pull01\n```objc\nself.tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];\n```\n![(上拉刷新07-自动回弹的上拉01)](http://images0.cnblogs.com/blog2015/497279/201506/141205392239231.gif)\n\n## \u003ca id=\"The_pull_to_refresh_08-Automatic_back_of_the_pull02\"\u003e\u003c/a\u003eThe pull to refresh 08-Automatic back of the pull02\n```objc\nMJRefreshBackGifFooter *footer = [MJRefreshBackGifFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];\n\n// Set the normal state of the animated image\n[footer setImages:idleImages forState:MJRefreshStateIdle];\n//  Set the pulling state of animated images（Enter the status of refreshing as soon as loosen）\n[footer setImages:pullingImages forState:MJRefreshStatePulling];\n// Set the refreshing state of animated images\n[footer setImages:refreshingImages forState:MJRefreshStateRefreshing];\n\n// Set footer\nself.tableView.mj_footer = footer;\n```\n![(上拉刷新07-自动回弹的上拉02)](http://images0.cnblogs.com/blog2015/497279/201506/141205441443628.gif)\n\n## \u003ca id=\"The_pull_to_refresh_09-DIY_the_control_of_refresh(Automatic_refresh)\"\u003e\u003c/a\u003eThe pull to refresh 09-DIY the control of refresh(Automatic refresh)\n```objc\nself.tableView.mj_footer = [MJDIYAutoFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];\n// Implementation reference to MJDIYAutoFooter.h和MJDIYAutoFooter.m\n```\n![(上拉刷新09-自定义刷新控件(自动刷新))](http://images0.cnblogs.com/blog2015/497279/201506/141205500195866.gif)\n\n## \u003ca id=\"The_pull_to_refresh_10-DIY_the_control_of_refresh(Automatic_back)\"\u003e\u003c/a\u003eThe pull to refresh 10-DIY the control of refresh(Automatic back)\n```objc\nself.tableView.mj_footer = [MJDIYBackFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];\n// Implementation reference to MJDIYBackFooter.h和MJDIYBackFooter.m\n```\n![(上拉刷新10-自定义刷新控件(自动回弹))](http://images0.cnblogs.com/blog2015/497279/201506/141205560666819.gif)\n\n## \u003ca id=\"UICollectionView01-The_pull_and_drop-down_refresh\"\u003e\u003c/a\u003eUICollectionView01-The pull and drop-down refresh\n```objc\n// The drop-down refresh\nself.collectionView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{\n   //Call this Block When enter the refresh status automatically \n}];\n\n// The pull to refresh\nself.collectionView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{\n   //Call this Block When enter the refresh status automatically\n}];\n```\n![(UICollectionView01-上下拉刷新)](http://images0.cnblogs.com/blog2015/497279/201506/141206021603758.gif)\n\n## \u003ca id=\"UICollectionView02-The_trailer_refresh\"\u003e\u003c/a\u003eUICollectionView02-The trailer refresh\n```objc\n// The trailer refresh\nself.collectionView.mj_trailer = [MJRefreshNormalTrailer trailerWithRefreshingBlock:^{\n   //Call this Block When enter the refresh status automatically \n}];\n\n```\n![(UICollectionView02-左拉刷新)](Gif/trailer_refresh.gif)\n\n## \u003ca id=\"WKWebView01-The_drop-down_refresh\"\u003e\u003c/a\u003eWKWebView01-The drop-down refresh\n```objc\n//Add the control of The drop-down refresh\nself.webView.scrollView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{\n   //Call this Block When enter the refresh status automatically\n}];\n```\n![(UICollectionView01-上下拉刷新)](http://images0.cnblogs.com/blog2015/497279/201506/141206080514524.gif)\n\n## Remind\n* ARC\n* iOS\u003e=9.0\n* iPhone \\ iPad screen anyway\n\n## 寻求志同道合的小伙伴\n\n- 因本人工作忙，没有太多时间去维护MJRefresh，在此向广大框架使用者说声：非常抱歉！😞\n- 现寻求志同道合的小伙伴一起维护此框架，有兴趣的小伙伴可以[发邮件](mailto:richermj123go@vip.qq.com)给我，非常感谢😊\n- 如果一切OK，我将开放框架维护权限（github、pod等）\n- 目前已经找到3位小伙伴(＾－＾)V\n","funding_links":[],"categories":["UI","awesome-ios ##","Objective-C","UI Components","9. 其他与展望","Object-C 库","Objective-C  Stars 1000以内排名整理","OOM-Leaks-Crash","Minor"],"sub_categories":["Pull to Refresh","Layout","Other free courses","5. 参考材料","Refresh"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCoderMJLee%2FMJRefresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCoderMJLee%2FMJRefresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCoderMJLee%2FMJRefresh/lists"}