{"id":2723,"url":"https://github.com/BeatsKitano/KafkaRefresh","last_synced_at":"2025-08-03T00:32:27.666Z","repository":{"id":40612182,"uuid":"116347498","full_name":"BeatsKitano/KafkaRefresh","owner":"BeatsKitano","description":"Animated, customizable, and flexible pull-to-refresh framework for faster and easier iOS development. ","archived":false,"fork":false,"pushed_at":"2023-06-26T02:45:13.000Z","size":1199,"stargazers_count":1199,"open_issues_count":0,"forks_count":142,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-07-30T06:03:48.113Z","etag":null,"topics":["animation","ios","objective-c","pull-to-refresh","refresh","refresh-framework","refresh-styles","refreshview","uirefreshcontrol","uiscrollview"],"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/BeatsKitano.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-01-05T05:51:24.000Z","updated_at":"2024-06-23T15:33:24.000Z","dependencies_parsed_at":"2024-06-18T13:57:49.098Z","dependency_job_id":null,"html_url":"https://github.com/BeatsKitano/KafkaRefresh","commit_stats":null,"previous_names":["xorshine/kafkarefresh","hsiaohuihsiang/kafkarefresh"],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeatsKitano%2FKafkaRefresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeatsKitano%2FKafkaRefresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeatsKitano%2FKafkaRefresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeatsKitano%2FKafkaRefresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BeatsKitano","download_url":"https://codeload.github.com/BeatsKitano/KafkaRefresh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228510783,"owners_count":17931762,"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":["animation","ios","objective-c","pull-to-refresh","refresh","refresh-framework","refresh-styles","refreshview","uirefreshcontrol","uiscrollview"],"created_at":"2024-01-05T20:16:21.134Z","updated_at":"2024-12-06T18:30:44.042Z","avatar_url":"https://github.com/BeatsKitano.png","language":"Objective-C","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=#\u003e\n    \u003cimg src=\"https://github.com/xorshine/KafkaRefresh/blob/master/Assets/titleView.png\" alt=\"\" width=60 height=60\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003eKafkaRefresh\u003c/h3\u003e \n  \u003cp align=\"center\"\u003e\n     Animated, customizable, and flexible pull-to-refresh framework for faster and easier iOS development.\n    \u003cbr\u003e \n    \u003cbr\u003e\n    \u003ca href=\"https://github.com/xorshine/KafkaRefresh/issues/new?template=bug_en.md\"\u003eReport bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/xorshine/KafkaRefresh/issues/new?template=feature.md\u0026labels=feature\"\u003eRequest feature\u003c/a\u003e \n    ·\n    \u003ca href=\"https://github.com/xorshine/KafkaRefresh/blob/master/CREADME.md\"\u003e中文文档\u003c/a\u003e \n  \u003c/p\u003e\n\u003c/p\u003e \n\u003cbr\u003e\n\n### Status\n\u003c!--[![Travis](https://img.shields.io/travis/rust-lang/rust.svg)](https://github.com/xorshine/KafkaRefresh)[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FHHHsiang%2FKafkaRefresh.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FHHHsiang%2FKafkaRefresh?ref=badge_shield)\n--\u003e\n[![GitHub license](https://img.shields.io/github/license/xorshine/KafkaRefresh.svg)](https://github.com/xorshine/KafkaRefresh/blob/master/LICENSE)\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/KafkaRefresh.svg)](https://img.shields.io/cocoapods/v/KafkaRefresh.svg)\n![platform](https://img.shields.io/badge/platform-ios-lightgrey.svg)\n![language](https://img.shields.io/badge/language-objc-orange.svg) \n[![Email](https://img.shields.io/badge/e--mail-xorshine%40icloud.com-blue.svg)](mailto:xorshine@icloud.com) \n\n****\n\n### Screenshots\n\u003ctable\u003e\n\u003ctr height=\"60px\" align=\"center\"\u003e\n  \u003ctd width=\"20%\"\u003e\u003cstrong\u003eKafkaRefreshStyle\u003c/strong\u003e\u003c/td\u003e\n  \u003ctd width=\"40%\"\u003e\u003cstrong\u003eTop Screenshots\u003c/strong\u003e\u003c/td\u003e\n  \u003ctd width=\"40%\"\u003e\u003cstrong\u003eBottom Screenshots\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr align=\"center\" height=\"120px\"\u003e\n  \u003ctd width=\"300px\"\u003eNative\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/native.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/_native.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr align=\"center\" height=\"120px\"\u003e\n  \u003ctd\u003eReplicatorWoody\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/woody.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/_woody.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr align=\"center\" height=\"120px\"\u003e\n  \u003ctd\u003eReplicatorAllen\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/allen.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/_allen.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr align=\"center\" height=\"120px\"\u003e\n  \u003ctd\u003eReplicatorCircle\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/circle.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/_circle.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr align=\"center\" height=\"120px\"\u003e\n  \u003ctd\u003eReplicatorDot\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/dot.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/_dot.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr align=\"center\" height=\"120px\"\u003e\n  \u003ctd\u003eReplicatorArc\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/arc.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/_arc.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr align=\"center\" height=\"120px\"\u003e\n  \u003ctd\u003eReplicatorTriangle\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/triangle.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/_triangle.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr align=\"center\" height=\"120px\"\u003e\n  \u003ctd\u003eAnimatableRing\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/ring.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/_ring.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr align=\"center\" height=\"120px\"\u003e\n  \u003ctd\u003eAnimatableArrow\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/arrow.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"Assets/Gif/_arrow.gif\"\u003e\u003c/img\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n \n### Features\n\n*  **Built-in rich animation style, support self-customization** \n\n\n* **Non-refresh state hidden automatically** \n\n  \u003e  To avoid developers manually adjust contentInset refresh the appearance of the control after the impact of the visual experience;\u003c/br\u003e\n  the most common situation, the absence of data, the bottom of the refresh control is not hidden, the use of KafkaRefresh to avoid the problem.\n\n* **Anti-dithering at the end of the refresh** \n\n  \u003eWhen the refresh control finishes refreshing, if UIScrollView is in a scrolling state, KafkaRefresh will adjust the contntOffset that controls the UIScrollView at this time according to the refresh control.\n\n* **Support setting the offset threshold to trigger refresh** \n\n  \u003eSetting the value of `stretchOffsetYAxisThreshold` can control the refresh pull distance.This property is a ratio relative to the height of the control and must be set greater than 1.0.\n\n* **Support global setting** \n\n  \u003eKafkaRefreshDefaults is a singleton for global settings\n\n* **Support progress callback** \n\n  \u003eReal-time callback Drag the offset ratio, for the expansion of the interface, according to the progress of adjustment animation.\n\n* **Adaptive contentInset system adjustment and manual adjustment** \n\n  \u003eAdaptive UINavigationController for UIScrollView's contentInset property adjustment, even if the contentInset automatically set value, then KafkaRefresh can still adapt this adjustment.\n\n* **Solve the section view floating problem when refreshing** \n\n* **Support horizontal and vertical screen switching adaptive** \n\n  \u003eNo need to consider in the horizontal and vertical screen refresh refresh problem.\n\n* **iOS 7+**  \n\n  Support iOS 7 above system. Including iPhone X.\n\n* Support auto refresh\n\n  When the user slides the scrollview to the bottom, the refresh will be triggered automatically, without the user having to slide to the bottom and pull up the scrollview. This feature is not enabled by default, because most people will use the function without viewing the document. If it is not used correctly, it will be easy to cause the refresh to stop.\n\n  Use the preload feature, please strictly follow the requirements below:\n\n  * ```self.tableView.footRefreshControl.autoRefreshOnFoot = YES;``` please set autoRefreshOnFoot TRUE；\n\n  * in refreshHandler，Strictly follow the logic below！\n\n    ```objective-c\n     if ({No data needs to be stitched}) {\n         [weakSelf.tableView.footRefreshControl endRefreshingAndNoLongerRefreshingWithAlertText:@\"no more\"];\n     } else {\n         [weakSelf.tableView.footRefreshControl endRefreshingWithAlertText:@\"did load successfully\" completion:nil];\n     }\n    ```\n\n* **Document coverage 100%** \n\n  \u003e You can see the use of all methods and classes in the header file.\n\n\n### Installation \n* CocoaPods\n```ruby\npod 'KafkaRefresh'\n```\n\n* Carthage \n\n\u003e If anyone wants to install by *carthage* , please supply a pull request. I'm not using this package manager myself.\n\n### Usage\n\n```objective-c\n #import \"KafkaRefresh.h\" \n```\n\n##### Initialization\n* The first way\n```objective-c\n#pragma mark - head\n\n[self.tableView bindHeadRefreshHandler:^{\n        \n    } themeColor:MainColor refreshStyle:KafkaRefreshStyleAnimatableArrow];\n\n#pragma mark - foot\n\n[self.tableView bindFootRefreshHandler:^{\n        \n    } themeColor:MainColor refreshStyle:KafkaRefreshStyleAnimatableArrow]; \n\n#pragma mark - auto refresh\n\nself.tableView.footRefreshControl.autoRefreshOnFoot = YES;\n```\n* The second way\n```objective-c\n KafkaArrowHeader * arrow = [[KafkaArrowHeader alloc] init];\n arrow.refreshHandler = ^{\n\t //to do something... \n };\n self.tableView.headRefreshControl = arrow;\n```\n* The third way(global configuration)\n```objective-c\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n\t[[KafkaRefreshDefaults standardRefreshDefaults] setHeaderDefaultStyle:KafkaRefreshStyleAnimatableRing];\n\treturn YES;\n}\n\n#pragma mark - global\n\n[self.tableView bindGlobalStyleForFootRefreshHandler:^{\n        \n}];\n```\n##### Trigger Refresh Manually\n\n```objective-c\n [self.tableView.headRefreshControl beginRefreshing];\n [self.tableView.footRefreshControl beginRefreshing];\n```\n\n##### End Refresh\n\u003e When you finish refreshing and don't need to show any hints, or any animation, call the following method.\n\n```objective-c\n- (void)endRefreshing; \n```\n\u003e When you finish the refresh and need to display the prompt message, call the following method.\n\n```objective-c\n- (void)endRefreshingWithAlertText:(NSString *)text completion:(dispatch_block_t)completion; \n```\n\n\u003eWhen you end the refresh and no longer need to refresh, call the following method.\n\n```objective-c\n- (void)endRefreshingAndNoLongerRefreshingWithAlertText:(NSString *)text;\n```\n##### Resume Refresh Available\n```objective-c\n/**\n After you call ‘endRefreshingAndNoLongerRefreshingWithAlertText’,\n you need to resume refresh available\n */\n- (void)resumeRefreshAvailable;\n```\n\n### Customize\n\nTake KafkaheadRefreshControl as an example\n```objective-c\n #import \"KafkaheadRefreshControl.h\"\n @interface CustomHeader : KafkafootRefreshControl\n @end\n```\n\n ```objective-c\n @implementation CustomHeader \n\n- (void)kafkaDidScrollWithProgress:(CGFloat)progress max:(const CGFloat)max{\n\t//progress callback\n}\n\n- (void)kafkaRefreshStateDidChange:(KafkaRefreshState)state{\n\t[super kafkaRefreshStateDidChange:state];\n}\n@end\n ```\n### Warnings And Precautions \n\n* Many people asked me a question that tableView jump after called `insertRowAtIndexPath: withRowAnimation:`,That Is Not Bug Of KafkaRefresh. Setting `tableView.estimatedRowHeight = UITableViewAutomaticDimension;` can solve this question when you initialize tableView;\n\n\n* Please update the latest version!\n\n\n### Communication\n\u003e 1. If you need help，please email \u003cxorshine@icloud.com\u003e.\n\u003e 2. If you found a bug，and can provide steps to reliably reproduce it, open an issue.\n\u003e 3. Personal energy is limited, Kafka provides callback interface enough to increase the richer UI effect, we welcome you to join together and submit the pull request.  \n\n\n### License\n\u003e KafkaRefresh is released under the MIT license. See [LICENSE](https://github.com/xorshine/KafkaRefresh/blob/master/LICENSE) for details.\n\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FHHHsiang%2FKafkaRefresh.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FHHHsiang%2FKafkaRefresh?ref=badge_large)","funding_links":[],"categories":["UI","OOM-Leaks-Crash"],"sub_categories":["Pull to Refresh","Refresh"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBeatsKitano%2FKafkaRefresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBeatsKitano%2FKafkaRefresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBeatsKitano%2FKafkaRefresh/lists"}