[![CI Status](http://img.shields.io/travis/Eric Huang/EHLoaders.svg?style=flat)](https://travis-ci.org/Eric Huang/EHLoaders)
pull to refresh & lift to load more.
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
To run the example project, clone the repo, and run pod install
from the Example directory first.
iOS 7.0+
EHLoaders is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "EHLoaders"
Eric Huang, WaterFlowsEast@gmail.com
EHLoaders is available under the MIT license. See the LICENSE file for more info.