SwiftUI has these pesky errors that show up when the backing graph is put into a sort of loop. Something along the lines of “Bounds preference updated multiple times per frame”, truly unhelpful and vague.

However, I’ve learned…
1195677
They’re presence in the console usually means some extra view updates are happening. SwiftUI likes to be stable, updates causing updates is bad. Having view state (like row heights) determine view visibility means update cascade is a real possibility.
1195678
Adding estimated views to the hierarchy was causing them to be removed in the same layout pass once they’re actual size was determined. So my solution is to only add to the estimation so that known sizes cannot cause removal from the view graph.
1195680
Selectively showing views is actually quite simple after that. Since the underlying layout knows each view position knows which are visible, their identity is maintained by a ForEach which is passed a visible subsequence of views and positions.
1195685
ForEach is kinda magical like that, it can take an arbitrary amount of views and represent it as one in the view graph.

Long story short: I don’t have any errors in the console and it’s working flawlessly so far.

More testing needed though!
1195689

Edge of Tomorrow

Okay, anyone remember that scene in Edge of Tomorrow where they talk with General but they don't quite know how to proceed because they've never managed to get that far with him before...

That feeling.

Except with less exoskeletons #prosedev
1195755
cookie jar ()