OS27 LazyVGrid hops like crazy on scroll up.

I’m not sure if this is a ”care later in the summer” situation, but on beta 1, with an .adaptive Grid Item, a scrolling LazyVGrid will hop and “bounce” when scrolling back up from the bottom of the grid.

I can see the scrollbar visibly hopping as item views are re-created.

Anyone else seeing this?

Answered by DTS Engineer in 894833022

Okay, I think I've isolated it more. My "hops like crazy" scenario was multiple LazyVGrids inside a single ScrollView. I'm going to assume that's not a supported configuration.

I've attached a project and some videos to FB23182374 . Let me know if you have any questions or want me to try some things out on it.

Thanks for this @J0hn! I see what's going on here.

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.

What stands out to me is:

Geometry-driven layout changes should happen in a single pass with a custom Layout, not through a state feedback loop.

This exact situation is covered in our WWDC26 session Dive into lazy stacks and scrolling with SwiftUI.

Watch that video, it will provide relevant insight into this app you are building.

And for usability concerns, you can probably get away with a fixed corner radius.

Lastly, your feedback report is still open and your use case is still important to us. Updates may be provided to you there, feel free to use the discussion to add more info in Feedback Assistant.

Let me know how it goes!

 Travis

I noticed it on iOS 26 too. I cannot scroll up normally via gestures. It is only possible via scroll thumb

Hello @J0hn,

This is interesting, are you able to provide a code snippet that reproduces the issue as well as share a screen recording of what you are describing?

If what you are seeing you believe to be a bug, it would be a good idea to upload these files to a Feedback report filed through Feedback Assistant, this way the relevant engineering team can get a head start on the investigation.

Once complete, share the feedback number with me here, so I can make sure it is correctly routed to that team.

For more information on filing feedback, see Bug Reporting: How and Why?

 Travis

Okay, I think I've isolated it more. My "hops like crazy" scenario was multiple LazyVGrids inside a single ScrollView. I'm going to assume that's not a supported configuration.

I've attached a project and some videos to FB23182374 . Let me know if you have any questions or want me to try some things out on it.

Thanks for this @J0hn! I see what's going on here.

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.

What stands out to me is:

Geometry-driven layout changes should happen in a single pass with a custom Layout, not through a state feedback loop.

This exact situation is covered in our WWDC26 session Dive into lazy stacks and scrolling with SwiftUI.

Watch that video, it will provide relevant insight into this app you are building.

And for usability concerns, you can probably get away with a fixed corner radius.

Lastly, your feedback report is still open and your use case is still important to us. Updates may be provided to you there, feel free to use the discussion to add more info in Feedback Assistant.

Let me know how it goes!

 Travis

@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.

@J0hn Thanks for filing that enhancement request!

This is good feedback and I made sure it is routed to the correct team.

What stood out to me about that first project is that each cell stores its own width in a State while in a lazy container. When elements in lazy containers scroll away from the screen they are deallocated and redrawn again when they come back into view. This means your cells State resets to zero and then renders again with their intended radius on the next possible frame. That's likely the cause of the "hop" you are seeing with content size.

To answer your questions directly:

A constant VStack with aspectRatio on the image area and lineLimit(_:reservesSpace:) on the label is stable. Every cell produces the same predictable height, so LazyVGrid's size estimation stays accurate. The placeholder not affecting the frame is generally the right approach.

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?

Not explicitly, however it could be implied through other ways like how you do with background colors.

I completely understand the frustration and you are in the right place talking to the right people. So thank you for that.

Try these changes and I'd like to see an updated sample project – if there is still a use case you feel you are missing: I'd be happy to share another enhancement request with the relevant team.

There might also be more helpful information in Grouping data with lazy stack views.

Thank you!

 Travis

OS27 LazyVGrid hops like crazy on scroll up.
 
 
Q