{"id":18880818,"url":"https://github.com/keenteam1990/lnrefresh","last_synced_at":"2025-10-20T09:32:27.602Z","repository":{"id":107584569,"uuid":"147915141","full_name":"KeenTeam1990/LNRefresh","owner":"KeenTeam1990","description":"🍊LNRefresh Is a lightweight, can dynamically expand the drop-down refresh component","archived":false,"fork":false,"pushed_at":"2018-10-22T02:38:25.000Z","size":16280,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-31T03:23:20.126Z","etag":null,"topics":["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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KeenTeam1990.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,"publiccode":null,"codemeta":null}},"created_at":"2018-09-08T08:17:19.000Z","updated_at":"2024-09-12T14:02:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"27e650bf-fecb-45f9-b35b-278bd9b08acf","html_url":"https://github.com/KeenTeam1990/LNRefresh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeenTeam1990%2FLNRefresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeenTeam1990%2FLNRefresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeenTeam1990%2FLNRefresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeenTeam1990%2FLNRefresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KeenTeam1990","download_url":"https://codeload.github.com/KeenTeam1990/LNRefresh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239848053,"owners_count":19707079,"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":["refresh"],"created_at":"2024-11-08T06:46:09.335Z","updated_at":"2025-10-20T09:32:22.554Z","avatar_url":"https://github.com/KeenTeam1990.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./images/banner.png\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"#demo\"\u003eDemo\u003c/a\u003e -\n\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e -\n\u003ca href=\"#documents\"\u003eDocuments\u003c/a\u003e -\n\u003ca href=\"#contribution\"\u003eContribution\u003c/a\u003e\n\u003c/p\u003e\n    \n\u003cp align=\"center\"\u003e\n\u003ca href=\"http://cocoadocs.org/docsets/LNRefresh\"\u003e\u003cimg src=\"https://img.shields.io/badge/CocoaPods-compatible-4BC51D.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Carthage/Carthage\"\u003e\u003cimg src=\"https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://developer.apple.com/ios\"\u003e\u003cimg src=\"https://img.shields.io/badge/platform-iOS%207%2B-blue.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/wedxz/LNRefresh/tree/1.0.1\"\u003e\u003cimg src=\"https://img.shields.io/badge/release-1.0.1-blue.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.gnu.org/licenses/gpl-3.0\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-GPL%20v3-blue.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# LNRefresh\nLNRefresh Is a lightweight, can dynamically expand the drop-down refresh component\n\n#### Support what kinds of controls to refresh\n`UIScrollView`、`UITableView`、`UICollectionView`、`UIWebView`、`UITextView`\n\n## Demo\nGIF picture from [华尔街见闻](https://wallstreetcn.com/)\n\n| Style   | Demo |\n| ---   | --- |\n| Usually style | ![](./images/demo_1.gif) |\n| Dynamically change the style | ![](./images/demo_2.gif) |\n\n## Customize Demos\n| APP   | Demo |\n| ---   | --- |\n| 京东 | ![](./images/demo_jd.gif) |\n| 天猫 | ![](./images/demo_tmall.gif) |\n| 淘宝 | ![](./images/demo_taobao.gif) |\n| 考拉海购 | ![](./images/demo_kaola.gif) |\n| 美团外卖 | ![](./images/demo_meituan.gif) |\n| 网易新闻 | ![](./images/demo_neteasenews.gif) |\n| 今日头条 | ![](./images/demo_toutiao.gif) |\n| 飞猪 | ![](./images/demo_feizhu.gif) |\n\n## Installation\n### CocoaPods\nInstallation with CocoaPods:\n\n```\npod 'LNRefresh'\n```\n### Carthage\nInstallation with Cartfile:\n\n```\ngithub \"wedxz/LNRefresh\"\n```\n## Documents\n#### How to use LNRefresh\n###### Add pull to refresh\n```\n__weak typeof (self) wself = self;\n//UITableView\n[self.tableView addPullToRefresh:^{\n  [wself pullToRefresh];\n}];\n\n//UICollectionView\n[self.collectionView addPullToRefresh:^{\n  [wself pullToRefresh];\n}];\n\n//UIWebView\n[self.webView.scrollView addPullToRefresh:^{\n   [wself.webView reload];\n}];\n```\n###### End Pull to refresh\n```\n//UITableView\n[self.tableView endRefreshing];\n\n//UICollectionView\n[self.collectionView endRefreshing];\n\n//UIWebView\n[self.webView.scrollView endRefreshing];\n```\n###### Add Loading more\n```\n//UITableView\n[self.tableView addInfiniteScrolling:^{\n  [wself loadMoreRefresh];\n}];\n\n//UICollectionView\n[self.collectionView addInfiniteScrolling:^{\n  [wself loadMoreRefresh];\n}];\n```\n###### End Loading more\n```\n//UITableView\n[self.tableView endLoadingMore];\n\n//UICollectionView\n[self.tableView endLoadingMore];\n```\n###### No More data\n```\n//UITableView\n[self.tableView noticeNoMoreData];\n\n//UICollectionView\n[self.tableView noticeNoMoreData];\n```\n###### Auto Refresh\n```\n[self.scrollView startRefreshing];\n```\n###### Change the trigger to pull the refresh distance\n```\nself.tableView.ln_header.animator.trigger = 100;\n```\n\n#### Global Settings\n###### Set the GIF image\n```\n+ (void)setAllHeaderAnimatorStateImages:(NSArray *)stateImages\n                                  state:(LNRefreshState)state;\n\n+ (void)setAllHeaderAnimatorStateImages:(NSArray *)stateImages\n                                  state:(LNRefreshState)state\n                               duration:(NSTimeInterval)duration;\n```\n###### Change the global pull-down refresh pattern state\n```\n+ (void)changeAllHeaderAnimatorType:(LNRefreshHeaderType)type;\n\n+ (void)changeAllHeaderAnimatorType:(LNRefreshHeaderType)type\n                            bgImage:(UIImage *)image;\n\n+ (void)changeAllHeaderAnimatorType:(LNRefreshHeaderType)type\n                            bgImage:(UIImage *)image\n                        incremental:(CGFloat)incremental;\n```\n\n#### Customize RefreshAnimator\nYou Need to inherit LNHeaderAnimator，Rewrite the following method.\n\n```\n- (void)setupHeaderView_DIY;\n- (void)layoutHeaderView_DIY;\n- (void)refreshHeaderView_DIY:(LNRefreshState)state;\n- (void)refreshView_DIY:(LNRefreshComponent *)view progress:(CGFloat)progress;\n```\nExample: `LNHeaderDIYAnimator.m`\n\n#### Analysis\nExample: `LNHeaderAnimator+Analysis.m`\n\n## Contribution\n[vvusu](https://github.com/KeenTeam1990)\n## License\n\u003ca href=\"https://www.gnu.org/licenses/gpl-3.0\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-GPL%20v3-blue.svg\"\u003e\u003c/a\u003e\n\nCopyright (c) 2017 KEENTEAM\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeenteam1990%2Flnrefresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeenteam1990%2Flnrefresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeenteam1990%2Flnrefresh/lists"}