All around Unread.app like pull to refresh library.
- ARC.
- iOS 7 or higher.
Add pod 'AASpringRefresh'
to your Podfile.
- Copy
AASpringRefresh
directory to your project.
#import "AASpringRefresh.h"
...
AASpringRefresh *springRefresh = [self.scrollView addSpringRefreshPosition:AASpringRefreshPositionTop actionHandler:^(AASpringRefresh *v) {
// do something...
}];
You can customize below properties.
springRefresh.unExpandedColor = [UIColor grayColor];
springRefresh.expandedColor = [UIColor blackColor];
springRefresh.readyColor = [UIColor redColor];
springRefresh.text = @"REFRESH"; // available for position Top or Bottom.
springRefresh.borderThickness = 6.0;
springRefresh.affordanceMargin = 10.0; // to adjust space between scrollView edge and affordanceView.
springRefresh.offsetMargin = 30.0; // to adjust threshold of offset.
springRefresh.threshold = 60.0; // default is width or height of size.
springRefresh.size = CGSizeMake(60.0, 40.0); // to adjust expanded size and each interval space.
springRefresh.show = NO; // dynamic show/hide affordanceView and add/remove KVO observer.
MIT License