Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adriantabirta/atrefreshcontrol
Custom UIRefreshControl in Swift.
https://github.com/adriantabirta/atrefreshcontrol
ios refreshcontrol swift swift-3 xcode
Last synced: 23 days ago
JSON representation
Custom UIRefreshControl in Swift.
- Host: GitHub
- URL: https://github.com/adriantabirta/atrefreshcontrol
- Owner: adriantabirta
- Created: 2017-11-26T21:17:28.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-26T21:23:14.000Z (about 7 years ago)
- Last Synced: 2024-11-19T06:58:56.979Z (3 months ago)
- Topics: ios, refreshcontrol, swift, swift-3, xcode
- Language: Swift
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ATRefreshControl
A custom UIRefreshControl written in Swift with gradient animation.
[![N|Solid](https://i.imgur.com/sdxV5Yq.gif)](https://i.imgur.com/sdxV5Yq.gif)
Exemple:
```sh
import UIKitclass ViewController: UIViewController {
@IBOutlet fileprivate weak var tableview: UITableView!
fileprivate lazy var refresh = ATRefreshControl()override func viewDidLoad() {
super.viewDidLoad()
tableview.delegate = self
tableview.addSubview(refresh)
}
}extension ViewController: UIScrollViewDelegate {
func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
refresh.containingScrollViewDidEndDragging(scrollView)
}func scrollViewDidScroll(_ scrollView: UIScrollView) {
refresh.didScroll(scrollView)
}
}extension ViewController: UITableViewDelegate, UITableViewDataSource {
/*
your implementation here
*/
}
```### Installation
Just drag and drop ATRefreshControl.swift file in your project.### Todos
- Add beginRefreshing(), endRefreshing()
- Add custom animation while scrollLicense
----
MIT