I’m at another decision point, I spent a half hour hacking together a native UIKit list backed by SwiftUI views and it works. Like before, I loose some convenience with refresh control but the scrolling is smoother than my implementation.
I made amazing progress after incorporating ideas from the first version; no more flickering refresh control. Having more direct access to UIKit is great, a small trick with the content inset means I can load things in place even for short conversations
That decision to step back into UIKit payed off, I managed to squash some long time annoyances with my SwiftUI implementation. Plus, I learned a few things for the future about how update cycles can mess with UIKit controls. #prosedev
What’s really awesome is I’ve nearly abstracted the whole thing into a reusable component like I intended. I rolled my own RefreshAction [developer.apple.com] to better model a UIRefreshControl in SwiftUI (with async/await) but it provides more flexibility.
For example, I built in a feature where it awaits until the scroll view ends dragging/decelerating before it updates the underlying data. Removes a whole set of jitters, and it’s hidden under an async function.
Main thing, I’m super excited to put a bow on something I started way back in March 2020. I dare not say finished, but my goals all have checks beside them #dev