To run the example project, clone the repo, and run pod install
from the Example directory first.
AiryRefreshControl *headerRefreshControl = [AiryRefreshControl attachHeaderRefreshControlToScrollView:self.scrollView target:self action:@selector(loadLatest)];
You can also customise your header refresh view by adopt protocol AiryHeaderRefreshViewDataSource
,then set the view to AiryRefreshControl
like this:
AiryRefreshControl *headerRefreshControl = [AiryRefreshControl attachHeaderRefreshControlToScrollView:self.scrollView target:self action:@selector(loadLatest)];
UIView<AiryHeaderRefreshViewDataSource> *customHeaderRefreshView = [[AiryCustomHeaderRefreshView alloc] init];
[headerRefreshControl setHeaderRefreshView:customHeaderRefreshView];
AiryRefreshControl *footerRefreshControl = [AiryRefreshControl attachFooterRefreshControlToScrollView:self.scrollView target:self action:@selector(loadMore)];
AiryRefreshControl *refreshControl = [AiryRefreshControl attachRefreshControlToScrollview:self.scrollView target:self headerRefreshAction:@selector(loadLatest) footerRefreshAction:@selector(loadMore)];
AiryRefreshControl is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "AiryRefreshControl"
AiryRefreshControl is available under the MIT license. See the LICENSE file for more info.