全面的下拉刷新库。
AAPullToRefresh
目录复制到您的项目中。#import "AAPullToRefresh.h"
...
AAPullToRefresh *tv = [self.scrollView addPullToRefreshPosition:AAPullToRefreshPositionTop ActionHandler:^(AAPullToRefresh *v){
// do something...
// then must call stopIndicatorAnimation method.
[v performSelector:@selector(stopIndicatorAnimation) withObject:nil afterDelay:1.0f];
}];
您可以自定义以下属性。
tv.imageIcon = [UIImage imageNamed:@"launchpad"];
tv.borderColor = [UIColor whiteColor];
tv.borderWidth = 3.0f;
tv.threshold = 60.0f;
tv.showPullToRefresh = NO; // also remove KVO observer if set to NO.
- (void)manuallyTriggered; // Manually trigger the block.
- (void)setSize:(CGSize)size; // Zoom in/out size.
MIT