Lazyvgrid visual promblems after orientation change

I'm having issues with a Lazyvgrid displaying images after the screen orientation changes ( either from horizontal to portrait, or the reverse ) What happens is the images are not sized correctly. If 2 column , I see 1/3 of column 1 and the image in column 2 takes 2/3 of the screen width. Similar issues with 3 or 6 column layout. The Lazyvgrid is inside a ScrollView and thats inside a Tabview.

I'v tried to trick an update by changing the column layout, the content mode (fit/fill) of the images, etc. but so far nothing has worked.

Any suggestions ?, anyway to invalidate a lazyvgrid and have swiftui rebuild it ?

Thanks.

  • turned out to be programmer error, I was using a property in my calculations that hadn't been updated yet ( DOH )

Add a Comment