SwiftUI Pull to Refresh Support

Hi,

Are there plans to add Pull to Refresh support to List or ScrollView in iOS14?

This is a large gap and the workarounds create other issues.
  1. Wrapping all my swiftui view content in a UIScrollView ViewRepresentable wrapper (leveraging the refreshControl property of ScrollView) causes other issues. Specifically NavigationLinks driven by Binding<Idenfiable> don’t present (presumably the nesting within a UIHostingController to sit within the UIScrollView breaks this somehow).

  2. Refresh controls usually render above the Large Navigation bar titles which aren’t exposed as Views. This means with approaches that use Preferences and geometry readers can’t get an accurate scroll offset (because large titles shrink and grow as the user scrolls)

I can probably work around this by doing all my navigation in UIKit, calling back from Views to some parent object (eg Navigation Coordinator) who can then manage pushing View controllers that wrap SwiftUI views in hosting controllers. But that is not ideal.

Has anyone had any luck with a Pull to refresh solution in SwiftUI with navigation? (other than introspecting the View tree for secret UITableViews etc)

I also want to know
I also want to know
I also want to know
Please add pull to refresh to SwiftUI
This is a necessary feature that SwiftUI must have!!
SwiftUI must have everything UIKit and AppKit have, and more!
This is absolutely must feature, please implement as top priority.
I have had success with the following native implementation from SwiftUI Lab: https://gist.github.com/swiftui-lab/3de557a513fbdb2d8fced41e40347e01

A few modifications had to be made including changes to use the new ProgressView etc.
I also want to know
I wonder why this is not included in SwiftUI !!! What were the developers thinking ?
I'm on iOS 13 and Xcode 11, so it may be different. I haven't seen the issues around navigation links described in the OP.

Overall, there's a couple of options as a starting point to play with:

https://github.com/siteline/SwiftUIRefresh uses UIKit to provide a fairly simple way of controlling the refresh action (but sounds like the approach described in the OP that creates problems with navigation links)

https://gist.github.com/swiftui-lab/3de557a513fbdb2d8fced41e40347e01 is a pure SwiftUI implementation, but doesn't work on some views (including a list view in NavigationView)
I also want to know
I also want to know
We need this now
I concur, the pull to refresh is essential for our app as well. At the moment we're assessing whether to switch back to UIKit because of the issues with Pull to refresh implementation (and crashes it brings), and because of other issues we faced (and most probably will face) until new SwiftUI will be more stable and new iOS versions will be installed by most of our users.
I hope they already working on it...
Yes this is a big issue, going to have to revert to old school UIs with reload buttons..
I also want to know.
I found this: swiftui-lab.com/scrollview-pull-to-refresh

So far, this is the closest I've gotten to a pull to refresh that works. I was able to adapt it for my needs in one project.

That being said, there only seem to be a small handful of examples of people attempting this on their own, none of which work flawlessly. I'm really hoping to see native pull to refresh added simply so we're all doing it in a consistent and preferred manner.

It's very difficult to find working solution. Apple please address this feature asap
Same here
I also need this
Strange oversight.

Just a simple:
onPullToRefresh {

}
This is much-needed! I really hope they do this soon.
I would also appreciate a native Pull-to-refresh implementation. @Apple: Any plans to add this anytime soon?
SwiftUI Pull to Refresh Support
 
 
Q