In my app I want to have a scrollable vertical list of rows with 4 images per row, on a total around 1300 SVG images. The images are stored locally in the assets of the app.
My View example:
ScrollableView > LazyVStack > ForEach Chunks of 4 > HStack > ForEach Image > Image
How can I do such thing since I run out of memory when scrolling through the images? Images are being loaded in memory as the user scrolls through the list, but they are not being unloaded from memory when they are not shown.
A detailed explanation of how I should proceed would be great. Thanks
I tried using List and LazyVStack with no success. Tried to use pagination over the 1300 images I want to display and also with no success. Always getting out of memory when I try to see all available images.
mRz3ro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.