Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

✳️ SwiftUI Pull to Refresh (for iOS 13 and iOS 14) condensed into a single modifier.

NotificationsYou must be signed in to change notification settings

Geri-Borbas/iOS.Blog.SwiftUI_Pull_to_Refresh

Repository files navigation

⬇️🔄 SwiftUI Pull to Refresh (for iOS 13 and iOS 14) condensed into a single modifier.

Complementary repository for articleSwiftUI Pull to Refresh (for iOS 13 and iOS 14). With this extension you canbackport the iOS 15 refreshable modifier to iOS 13 and iOS 14, and use the exact same code across the board.

SwiftUI_Pull_to_Refresh_iOS_13_iOS_14.mp4
structContentView:View{...varbody:someView{List{...}.refreshable{await viewModel.fetch()}}}

Alternatively, you can opt into theclosure-based API below to spare using async await API.

structContentView:View{...varbody:someView{List{...}.onRefresh{ refreshControlin            viewModel.fetch{                refreshControl.endRefreshing()}}}}

Quick Start

See details inOnRefreshModifier.swift andRefreshableModifier.swift inRefreshable package. Find the examples above in theExamples folder.

For your own projects, simply useRefreshable Swift Package.

License

Licensed under theMIT License.

About

✳️ SwiftUI Pull to Refresh (for iOS 13 and iOS 14) condensed into a single modifier.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp