https://github.com/noppefoxwolf/refreshcontrol
A customized refresh control based on UIRefreshControl.
https://github.com/noppefoxwolf/refreshcontrol
ios pull-to-refresh uikit
Last synced: 13 days ago
JSON representation
A customized refresh control based on UIRefreshControl.
- Host: GitHub
- URL: https://github.com/noppefoxwolf/refreshcontrol
- Owner: noppefoxwolf
- License: mit
- Created: 2023-09-08T05:48:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-24T17:39:01.000Z (about 1 year ago)
- Last Synced: 2024-05-02T05:46:11.254Z (12 months ago)
- Topics: ios, pull-to-refresh, uikit
- Language: Swift
- Homepage:
- Size: 1.15 MB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RefreshControl

> [!WARNING]
> The `noppefoxwolf/RefreshControl` is using some black magic.
> I recommend reviewing the implementation code.
> You can use this library with own risk.# Feature
## UIRefreshControl compatible
- [x] Arrow style content view (ContentHostingRefreshControl)
- [x] Offscreen begin refresh (WaitHostingRefreshControl)
- [x] UIRefreshControl extensions (UIRefreshControl+)## Subclass extends
- [x] Customize content view (ContentHostingRefreshControl)
- [x] Overtime message (OvertimeRefreshControl)
- [x] Timeout handler (TimeoutRefreshControl)
- [x] Add delegate (DelegatableRefreshControl)
- [x] Private method access (InternalRefreshControl)## Additional extends
- [x] disabled control (RefreshControlController)# Usage
The `noppefoxwolf/RefreshControl` is subclass of UIRefreshControl.
You can use this library same of UIRefreshControl.```swift
import RefreshControl
...
refreshControl = RefreshControl()
refreshControl!.addAction(UIAction { _ in
...
}, for: .primaryActionTriggered)
```If you want to use disabled refreshControl.
You can use `RefreshControlController`.```swift
tableView.refreshControlController = RefreshControlController(
refreshControl: refreshControl
)
tableView.refreshControlController.isEnabled = false // Show disabled view
```## Apps Using
If you use a RefreshControl, add your app via Pull Request.
# LICENSE
RefreshControl is released under an MIT license. See the LICENSE file for more information