javaBin/javazone-ios-app

Pull to refresh on list

Closed this issue · 2 comments

SwiftUI doesn't support pull to refresh out of the box yet - but lots of tutorials and examples online

As of right now I've found several complex swiftUI implementations, one embed with UIScrollView that also seems to require rewriting much of the view stack. Not entirely sure how they play with core data.

Tempted to wait until WWDC 2020 (June) to see if swiftUI gets this as an update :)

OK - found a swiftui package for this. Cool.

So far it will refresh.

ToDo:

  • Clear the spinner when refresh completes - not just after a delay
  • It doesn't reload sessions (calculated property) until you close and re-open. Add a bool state var - and change it on reload complete - then refer to it in the calc property - my hope is that this will trigger swiftui to think that the calc property has changed since it depends on a changed state var and will re-read.