{"id":24896772,"url":"https://github.com/vvusu/LNRefresh","last_synced_at":"2025-10-16T11:31:20.735Z","repository":{"id":56918888,"uuid":"98389397","full_name":"vvusu/LNRefresh","owner":"vvusu","description":"轻量级下拉刷新控件,各种动画集合（京东，天猫，淘宝，考拉海购，美团，今日头条，飞猪）","archived":false,"fork":false,"pushed_at":"2022-02-28T12:51:20.000Z","size":34183,"stargazers_count":340,"open_issues_count":2,"forks_count":39,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-08-08T23:51:21.768Z","etag":null,"topics":["objective-c"],"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/vvusu.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}},"created_at":"2017-07-26T06:47:37.000Z","updated_at":"2024-08-28T06:53:36.000Z","dependencies_parsed_at":"2022-08-21T04:50:29.191Z","dependency_job_id":null,"html_url":"https://github.com/vvusu/LNRefresh","commit_stats":null,"previous_names":["wedxz/lnrefresh"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/vvusu/LNRefresh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvusu%2FLNRefresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvusu%2FLNRefresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvusu%2FLNRefresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvusu%2FLNRefresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vvusu","download_url":"https://codeload.github.com/vvusu/LNRefresh/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvusu%2FLNRefresh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279183672,"owners_count":26121446,"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","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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"],"created_at":"2025-02-01T20:15:11.341Z","updated_at":"2025-10-16T11:31:17.105Z","avatar_url":"https://github.com/vvusu.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.4\"\u003e\u003cimg src=\"https://img.shields.io/badge/release-1.0.4-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 \"wszoo/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/wedxz)\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 vvusu \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvusu%2FLNRefresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvvusu%2FLNRefresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvusu%2FLNRefresh/lists"}