- Notifications
You must be signed in to change notification settings - Fork7
✳️ SwiftUI Pull to Refresh (for iOS 13 and iOS 14) condensed into a single modifier.
Geri-Borbas/iOS.Blog.SwiftUI_Pull_to_Refresh
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
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()}}}}
See details inOnRefreshModifier.swift andRefreshableModifier.swift inRefreshable package. Find the examples above in theExamples folder.
For your own projects, simply useRefreshable Swift Package.
Licensed under theMIT License.
About
✳️ SwiftUI Pull to Refresh (for iOS 13 and iOS 14) condensed into a single modifier.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.