Grid {
GridRow {
ColorSquare(color: .pink)
Color.clear
.gridCellUnsizedAxes([.horizontal, .vertical])
ColorSquare(color: .pink)
}
GridRow {
ForEach(0..<3) { _ in
ColorSquare(color: .green)
}
}
}
Results:
Pink | Pink | |
Green | Green | Green |
gridCellUnsizedAxes
: Asks grid layouts not to offer the view extra size in the specified axes.