Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wxxsw/refresh
π Great SwiftUI drop-down refresh and scroll up to load more. δΈζε·ζ°γδΈζε θ½½
https://github.com/wxxsw/refresh
loadmore refresh swiftui
Last synced: 6 days ago
JSON representation
π Great SwiftUI drop-down refresh and scroll up to load more. δΈζε·ζ°γδΈζε θ½½
- Host: GitHub
- URL: https://github.com/wxxsw/refresh
- Owner: wxxsw
- License: mit
- Created: 2020-02-29T07:26:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-12T11:28:17.000Z (almost 2 years ago)
- Last Synced: 2024-10-30T18:42:45.689Z (13 days ago)
- Topics: loadmore, refresh, swiftui
- Language: Swift
- Homepage: https://github.com/wxxsw/Refresh
- Size: 1.89 MB
- Stars: 403
- Watchers: 5
- Forks: 34
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Refresh](https://github.com/wxxsw/Refresh/blob/master/Images/logo.png)
- [Features](#features)
- [Usage](#usage)
- [Installation](#installation)
- [Requirements](#requirements)
- [License](#license)## Demo
Open `Refresh.xcodeproj` and run `Demo` target.
## Features
- [x] Support drop-down refresh and scroll up to load more.
- [x] Fully based on SwiftUI, no UIViewRepresentable, no UIViewControllerRepresentable.
- [x] Compatible with NavigationView, TabView.
- [x] Fully customizable UI.
- [x] Easy to animate.
- [x] Simple API.## Usage
```swift
ScrollView {
RefreshHeader(refreshing: $headerRefreshing, action: reload) { progress in
if self.headerRefreshing {
Text("refreshing...")
} else {
Text("Pull to refresh")
}
}ForEach(items) { item in
YourCell(item: item)
}RefreshFooter(refreshing: $footerRefreshing, action: loadMore) {
if self.noMore {
Text("No more data !")
} else {
Text("refreshing...")
}
}
.noMore(noMore)
.preload(offset: 50)
}
.enableRefresh()
```## Installation
### Swift Package Manager
1. Select `Xcode -> File -> Swift Packages -> Add Package Dependency...`
2. Enter `https://github.com/wxxsw/Refresh`.
3. Click `Next`, then select the version, complete.## Requirements
- iOS 13+
- Xcode 11+
- Swift 5+## License
Refresh is released under the MIT license. [See LICENSE](https://github.com/wxxsw/Refresh/blob/master/LICENSE) for details.