Image navigation bar pull to refresh library.
- ARC.
- iOS 8.
Add pod 'INBPullToRefresh'
to your Podfile.
- Copy
INBPullToRefresh
directory to your project.
#import "INBPullToRefreshView.h"
...
INBPullToRefreshView *refreshView = [self addPullToRefreshWithHeight:120 url:self.barImageURL tableView:self.tableView actoinHandler:^(INBPullToRefreshView *view) {
// do something...
// then must call stopAnimation method.
[view performSelector:@selector(stopAnimation)];
}];
You can customize below properties.
refreshView.pullIndicatorView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"reload.png"]];
refreshView.refreshThreshold = 60;
refreshView.maxImageHeight = 150;
refreshView.enableRefresh = NO; // tableView.bounces = NO;
This library is implemented by "Method swizzling". If you are using "Method swizzling" for below methods, it can twist with this library.
viewWillAppear:
viewDidAppear:
viewWillDisappear:
viewDidDisappear:
viewDidLayoutSubviews
MIT
cancel