@DTS Engineer
This sample project shows one LazyVGrid in a ScrollView, that looks fine – I'm curious to see if you find yourself needing to nest lazy stacks, there might be other ways to achieve the same result.
I tried nesting lazyVgrids cause I wanted to try to have per-section column layouts. It was mess, though, with entire sections disappearing on scroll. Suggestion for perSection columns here: FB23162564
This exact situation is covered in our WWDC26 session
I have watched this video. It is hard for me to know what about my views is "not stable enough".
The cells in my feedback project (FB23182374) are either a VStack or HStack, and that's not changed at run time in the project. It's compiled to always be VStack.
Does that "matter" to the internal mechanisms of LazyVGrid if that VStack never changes? I will experiment with this in my more complex app.
Given the VStack never changes, the cell body always contains an image display area that has an .aspectRatio modifier on it (giving it a stable height for a given width) and a label with a line limit that reserves space. Is that stable enough for the internal workings of LazyVGrid?
That image display area could show a placeholder depending on the loading state for that cell, but that does not impact the frame of the cell. It's all in the image-display-area that doesn't change size based on its content. Is that stable enough for the internal workings of LazyVGrid?
Is there a way to introspect what lazyVGrid things is going on? I've tried backgrounds with random colors and during scroll the colors will stay constant, which I think means layouts are not happening?
It's very frustrating to deal with these aspects of SwiftUI. We're on the seventh year now with no real CollectionView component.