Home > Net >  Is it possible to modify the position of items in a LazyVGrid/LazyHGrid (SwiftUI 5.5)?
Is it possible to modify the position of items in a LazyVGrid/LazyHGrid (SwiftUI 5.5)?

Time:11-06

I'm relatively new to Swift and have a grid layout question: I'm currently using a LazyHGrid with adaptive grid items and a single column to flexibly layout items without a predetermined column count. I determine the number of columns shown by setting a maxWidth the grid layout with a maxWidth based on the number of items to be displayed

What I'm trying to accomplish in each of the scenarios below (with a solution that would scale up too) is essentially to adjust the positions in the examples below by shifting items out of position "

  • Related