I want to create a grid in SwiftUI that will have a max of 4 columns, which I can do. What I cannot figure out is how to evenly space those grid items without growing in width by adding space between and outside, similar to the way Spacer() would work in an HStack.
-If user has 1 item, I want a single item centered in the row;
-If user has 3 items I want them evenly spaced and centered in the row, not expanding to fill the row;
-4 items would fill the row, evenly spaced;
-a fifth, and subsequent item(s) would create a new row and fall in line with the spacing in row 1.
| Column A |
| -------- |
| Cell 1 |
| Column A | | Column B |
| -------- | | -------- |
| Cell 1 | | Cell 2 |
4