Relative Content

Tag Archive for swiftswiftuidynamiclayout

SWIFTUI – How to Dynamically Arrange Items Horizontally Until Frame Boundary Reached, Then Continue in Next Row?

I am currently learning SwiftUI and have encountered an issue. I have an array of items that I would like to arrange horizontally until the end of the frame is reached. After that, I want to continue in the next row until the end of the frame again. And I want to repeat this process until the array is empty. I’m not sure, but I think this could be solved with a GeometryReader. However, I believe there must be an easier way for something as simple as this. Is there not a built-in function for this? Ideally, a lazy view?