Wxxsw Refresh Save

🎈 Great SwiftUI drop-down refresh and scroll up to load more. δΈ‹ζ‹‰εˆ·ζ–°γ€δΈŠζ‹‰εŠ θ½½

Project README

Refresh

codebeat badge


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

  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 for details.

Open Source Agenda is not affiliated with "Wxxsw Refresh" Project. README Source: wxxsw/Refresh
Stars
344
Open Issues
7
Last Commit
1 year ago
Repository
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating