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.
1222082
But, I suspect I could find the bottleneck in my code and it wouldn’t matter. Ugh…
1222083
So with some insomnia this morning I dug through dug out some bridged views (Menu) and found that SwiftUI itself might be the bottleneck.

I polished up the UICollectionView implementation; previous refresh control bridging still needs to be brought over.
1222223
Scrolling is very smooth, that’s been my ultimate goal aside from retaining scroll context during reloads.

As much as I want to use pure SwiftUI, the UICollectionView implementation now has fewer downsides.
1222224
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
1222475
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
1222517
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.
1222521
@shawn very exciting to hear Prose is coming along!!
1222526
@thedoctor I would favourite this post but I’m not that far along yet haha. I appreciate the excitement!
1222538
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.
1222535
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
1222541
@shawn ☑☑☑
1222544
‘Tis been encapsulated!
1222568