All Projects → HsiaohuiHsiang → Kafkarefresh

HsiaohuiHsiang / Kafkarefresh

Licence: mit
Animated, customizable, and flexible pull-to-refresh framework for faster and easier iOS development.

Projects that are alternatives of or similar to Kafkarefresh

MagiRefresh
swift版下拉刷新,支持多种样式,同时支持,加载动画,网络错误占位(有兴趣学习如何用swift使用runtime的可以看看)
Stars: ✭ 25 (-97.58%)
Mutual labels:  refresh, pull-to-refresh
Pulltomakeflight
Custom animated pull-to-refresh that can be easily added to UIScrollView
Stars: ✭ 497 (-51.89%)
Mutual labels:  pull-to-refresh, uiscrollview
Swiperefreshlayout
swipeRefreshLayout refresh pull-to-refresh
Stars: ✭ 26 (-97.48%)
Mutual labels:  pull-to-refresh, refresh
Pull To Refresh
ESPullToRefresh is developed and maintained by Vincent Li. If you have any questions or issues in using ESPullToRefresh, welcome to issue. If you want to contribute to ESPullToRefresh, Please submit Pull Request, I will deal with it as soon as possible.
Stars: ✭ 1,591 (+54.02%)
Mutual labels:  pull-to-refresh, refresh
ParticlesRefreshLayout-android
Particles Refresh Layout library for Android
Stars: ✭ 15 (-98.55%)
Mutual labels:  refresh, pull-to-refresh
Pull To Refresh.rentals Ios
This project aims to provide a simple and customizable pull to refresh implementation. Made in Yalantis
Stars: ✭ 2,171 (+110.16%)
Mutual labels:  pull-to-refresh, refresh
React Native Rk Pull To Refresh
a pull to refresh component for react-native, same api on both android and ios
Stars: ✭ 100 (-90.32%)
Mutual labels:  pull-to-refresh, refresh
SwiftFCXRefresh
Pull to refresh in Swift.
Stars: ✭ 29 (-97.19%)
Mutual labels:  refresh, pull-to-refresh
XLRefresh
iOS 下拉刷新工具
Stars: ✭ 25 (-97.58%)
Mutual labels:  refresh, uiscrollview
Pulltorefreshkit
【Deprecated】Pull to refresh in Swift, easy to use, easy to customize(下拉刷新/QQ/淘宝/优酷/雅虎天气/大众点评)
Stars: ✭ 533 (-48.4%)
Mutual labels:  pull-to-refresh
Vue Pull To
⚡️ A pull-down refresh and pull-up load more and infinite scroll component for Vue.js --Vue下拉刷新组件
Stars: ✭ 708 (-31.46%)
Mutual labels:  pull-to-refresh
React Native Ultimate Listview
A high performance FlatList providing customised pull-to-refresh | auto-pagination & infinite-scrolling | gridview layout | swipeable-row.
Stars: ✭ 497 (-51.89%)
Mutual labels:  pull-to-refresh
Zseatselector
Create a Seat Map Layout
Stars: ✭ 539 (-47.82%)
Mutual labels:  uiscrollview
Tysnapshotscroll
一句代码保存截图,将 UIScrollView UITableView UICollectionView UIWebView WKWebView 网页 保存 为 长图 查看。Save the scroll view page as an image,support UIScrollView,UITableView,UICollectionView,UIWebView,WKWebView.(Support iOS13)
Stars: ✭ 709 (-31.36%)
Mutual labels:  uiscrollview
Web Pull To Refresh
A native-like JavaScript pull to refresh implementation for the web.
Stars: ✭ 530 (-48.69%)
Mutual labels:  pull-to-refresh
Jt3dscrollview
ScrollView with custom effects during the scroll for iOS
Stars: ✭ 494 (-52.18%)
Mutual labels:  uiscrollview
Crrefresh
An easy way to use pull-to-refresh
Stars: ✭ 832 (-19.46%)
Mutual labels:  pull-to-refresh
Refreshwithappbarlayout
类似知乎和BilibiliAndroid端个人中心界面 添加下拉刷新效果
Stars: ✭ 19 (-98.16%)
Mutual labels:  refresh
Pullrefreshlayout
下拉刷新,上拉加载,真实的回弹(overscroll)效果(媲美qq),且大小只有37KB(是其他主流刷新库或回弹库的1/2,1/3,甚至是1/4),同时,自定义header和footer,可以实现任何你想的到的功能(例如:自动触发加载更多、二级刷新等)
Stars: ✭ 639 (-38.14%)
Mutual labels:  pull-to-refresh
Aosf
AOSF:全称为Android Open Source Framework,即Android优秀开源框架汇总。包含:网络请求okhttp,图片下载glide,数据库greenDAO,链式框架RxJava,组件路由ARouter,消息传递通信EventBus,热更新Tinker,插件化框架Replugin,文件下载FileDownloaer,图片选择PhotoPicker,图片滤镜/毛玻璃等特效处理,GIF图片展示控件,图片九宫格控件NineGridView,对话框Dialog,导航指示器ViewpagerIndicator,进度条ProgressWheel,下拉刷新SmartRefreshLayout,key-value高效数据存储MMKV等,应有尽有。
Stars: ✭ 601 (-41.82%)
Mutual labels:  refresh

KafkaRefresh

Animated, customizable, and flexible pull-to-refresh framework for faster and easier iOS development.

Report bug · Request feature · 中文文档


Status

GitHub license CocoaPods Compatible platform language Email


Screenshots

KafkaRefreshStyle Top Screenshots Bottom Screenshots
Native
ReplicatorWoody
ReplicatorAllen
ReplicatorCircle
ReplicatorDot
ReplicatorArc
ReplicatorTriangle
AnimatableRing
AnimatableArrow

Features

  • Built-in rich animation style, support self-customization

  • Non-refresh state hidden automatically

    To avoid developers manually adjust contentInset refresh the appearance of the control after the impact of the visual experience; 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.

  • Anti-dithering at the end of the refresh

    When 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.

  • Support setting the offset threshold to trigger refresh

    Setting 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.

  • Support global setting

    KafkaRefreshDefaults is a singleton for global settings

  • Support progress callback

    Real-time callback Drag the offset ratio, for the expansion of the interface, according to the progress of adjustment animation.

  • Adaptive contentInset system adjustment and manual adjustment

    Adaptive UINavigationController for UIScrollView's contentInset property adjustment, even if the contentInset automatically set value, then KafkaRefresh can still adapt this adjustment.

  • Solve the section view floating problem when refreshing

  • Support horizontal and vertical screen switching adaptive

    No need to consider in the horizontal and vertical screen refresh refresh problem.

  • iOS 7+

    Support iOS 7 above system. Including iPhone X.

  • Support auto refresh

    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.

    Use the preload feature, please strictly follow the requirements below:

    • self.tableView.footRefreshControl.autoRefreshOnFoot = YES; please set autoRefreshOnFoot TRUE;

    • in refreshHandler,Strictly follow the logic below!

       if ({No data needs to be stitched}) {
           [weakSelf.tableView.footRefreshControl endRefreshingAndNoLongerRefreshingWithAlertText:@"no more"];
       } else {
           [weakSelf.tableView.footRefreshControl endRefreshingWithAlertText:@"did load successfully" completion:nil];
       }
      
  • Document coverage 100%

    You can see the use of all methods and classes in the header file.

Installation

  • CocoaPods
pod 'KafkaRefresh'
  • Carthage

If anyone wants to install by carthage , please supply a pull request. I'm not using this package manager myself.

Usage

 #import "KafkaRefresh.h" 
Initialization
  • The first way
#pragma mark - head

[self.tableView bindHeadRefreshHandler:^{
        
    } themeColor:MainColor refreshStyle:KafkaRefreshStyleAnimatableArrow];

#pragma mark - foot

[self.tableView bindFootRefreshHandler:^{
        
    } themeColor:MainColor refreshStyle:KafkaRefreshStyleAnimatableArrow]; 

#pragma mark - auto refresh

self.tableView.footRefreshControl.autoRefreshOnFoot = YES;
  • The second way
 KafkaArrowHeader * arrow = [[KafkaArrowHeader alloc] init];
 arrow.refreshHandler = ^{
	 //to do something... 
 };
 self.tableView.headRefreshControl = arrow;
  • The third way(global configuration)
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
	[[KafkaRefreshDefaults standardRefreshDefaults] setHeaderDefaultStyle:KafkaRefreshStyleAnimatableRing];
	return YES;
}

#pragma mark - global

[self.tableView bindGlobalStyleForFootRefreshHandler:^{
        
}];
Trigger Refresh Manually
 [self.tableView.headRefreshControl beginRefreshing];
 [self.tableView.footRefreshControl beginRefreshing];
End Refresh

When you finish refreshing and don't need to show any hints, or any animation, call the following method.

- (void)endRefreshing; 

When you finish the refresh and need to display the prompt message, call the following method.

- (void)endRefreshingWithAlertText:(NSString *)text completion:(dispatch_block_t)completion; 

When you end the refresh and no longer need to refresh, call the following method.

- (void)endRefreshingAndNoLongerRefreshingWithAlertText:(NSString *)text;
Resume Refresh Available
/**
 After you call ‘endRefreshingAndNoLongerRefreshingWithAlertText’,
 you need to resume refresh available
 */
- (void)resumeRefreshAvailable;

Customize

Take KafkaheadRefreshControl as an example

 #import "KafkaheadRefreshControl.h"
 @interface CustomHeader : KafkafootRefreshControl
 @end
@implementation CustomHeader 

- (void)kafkaDidScrollWithProgress:(CGFloat)progress max:(const CGFloat)max{
   //progress callback
}

- (void)kafkaRefreshStateDidChange:(KafkaRefreshState)state{
   [super kafkaRefreshStateDidChange:state];
}
@end

Warnings And Precautions

  • 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;

  • Please update the latest version!

Communication

  1. If you need help,please email [email protected].
  2. If you found a bug,and can provide steps to reliably reproduce it, open an issue.
  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.

License

KafkaRefresh is released under the MIT license. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].