Skip to content

waterflowseast/EHLoaders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EHLoaders

[![CI Status](http://img.shields.io/travis/Eric Huang/EHLoaders.svg?style=flat)](https://travis-ci.org/Eric Huang/EHLoaders) Version License Platform

Summary

pull to refresh & lift to load more.

Usage

YourCustomRefreshLoaderView *refreshView = [[YourCustomRefreshLoaderView alloc] init];
self.scrollView.eh_header = [EHHeadLoader headerWithLoaderView:refreshView target:self action:@selector(refresh:);

YourCustomLoadMoreLoaderView *loadMoreView = [[YourCustomLoadMoreLoaderView alloc] init];
self.scrollView.eh_footer = [EHFootLoader footerWithLoaderView:loadMoreView target:self action:@selector(loadMore:);

those custom views' class should be subclass of EHLoaderView, and you should override methods in EHLoadersStateReactionDelegate to customize your behaviors.

@protocol EHLoadersStateReactionDelegate <NSObject>

@required
- (void)reactOnIdleStateForThresholdPercentage:(CGFloat)percentage;
- (void)reactOnTriggeredStateForThresholdPercentage:(CGFloat)percentage;
- (void)reactOnStateChangedFrom:(EHLoadersState)fromState to:(EHLoadersState)toState;

@optional
- (void)reactOnNoMoreDataFlagSetTo:(BOOL)hasNoMoreData;

@end

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 7.0+

Installation

EHLoaders is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "EHLoaders"

Author

Eric Huang, WaterFlowsEast@gmail.com

License

EHLoaders is available under the MIT license. See the LICENSE file for more info.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published