All around Unread.app like pull to refresh library.
Swift version of https://github.com/r-plus/AASpringRefresh
Add github "newbdez33/JZSpringRefresh"
to your Cartfile.
- Copy
JZSpringRefresh
directory to your project.
import JZSpringRefresh
...
let top = self.scrollView.addSpringRefresh(position: .top) { (v:JZSpringRefresh) in
print("top")
}
top.text = "REFRESH"
You can customize below properties.
springRefresh.unExpandedColor = UIColor.gray;
springRefresh.expandedColor = UIColor.black;
springRefresh.readyColor = UIColor.red;
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 = CGSize(width:60.0, height40.0); // to adjust expanded size and each interval space.
springRefresh.show = false; // dynamic show/hide affordanceView and add/remove KVO observer.
- Cocoapods support
MIT License