Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuantongl/swiftui-pulltorefresh
Pull to refresh ScrillView for SwiftUI
https://github.com/yuantongl/swiftui-pulltorefresh
ios scrollview swiftui
Last synced: 3 months ago
JSON representation
Pull to refresh ScrillView for SwiftUI
- Host: GitHub
- URL: https://github.com/yuantongl/swiftui-pulltorefresh
- Owner: YuantongL
- License: mit
- Archived: true
- Created: 2021-01-11T00:52:21.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-11T02:18:17.000Z (almost 4 years ago)
- Last Synced: 2024-09-24T21:41:07.197Z (4 months ago)
- Topics: ios, scrollview, swiftui
- Language: Swift
- Homepage:
- Size: 625 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwiftUI-PullToRefresh
## Introduction
SwiftUI's ScrollView does not support pull down to refresh, this is a library that adds refresh control to it.## Install
- Cocoapod. `pod SwiftUI-PullToRefresh`- SPM. `https://github.com/YuantongL/SwiftUI-PullToRefresh.git`
- Simply copy the source file under `/Source/RefreshableScrollView.swift`
## Usage
Use the RefreshableScrollView component from this library as below:
```
@State private var isLoading: Bool = falseRefreshableScrollView(isLoading: $isLoading,
onRefresh: {
// Update your data and
self.isLoading = false
},
content: {
// Draw your content view here
})
```
You can also checkout the example app.