项目
在 GitHub 查看

wxxsw/Refresh
关于
🎈 出色的 SwiftUI 下拉刷新和上拉加载更多组件。
网站与应用开发可以做什么
- Support drop-down refresh and scroll up to load more.
- Fully based on SwiftUI, no UIViewRepresentable, no UIViewControllerRepresentable.
- Compatible with NavigationView, TabView.
- Fully customizable UI.
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
Demo
Open Refresh.xcodeproj and run Demo target.

Features
- Support drop-down refresh and scroll up to load more.
- Fully based on SwiftUI, no UIViewRepresentable, no UIViewControllerRepresentable.
- Compatible with NavigationView, TabView.
- Fully customizable UI.
- Easy to animate.
- Simple API.
Usage
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
- Select
Xcode -> File -> Swift Packages -> Add Package Dependency... - Enter
https://github.com/wxxsw/Refresh. - Click
Next, then select the version, complete.
Requirements
- iOS 13+
- Xcode 11+
- Swift 5+
License
Refresh is released under the MIT license. See LICENSE for details.
探索相关项目
加载中…