WaterfallGrid icon indicating copy to clipboard operation
WaterfallGrid copied to clipboard

Span over columns

Open MKGitHub opened this issue 2 years ago • 1 comments

Hi, is there a way to span a cell over multiple columns? For example, I want 2 cells, and then 1 cell that spans over all columns…

1 2 -3- 4 5

thx

MKGitHub avatar Dec 03 '22 02:12 MKGitHub

Hi @MKGitHub , it's not possible to create that layout with a single grid. But you could technically achieve the same result if you use two different grids and separate them by a custom view that represents the cell 3:

eg:

ScrollView {
  WaterfallGrid(RectanglesArrayOne, content: RectangleView.init)
  CustomCellView3()
  WaterfallGrid(RectanglesArrayTwo, content: RectangleView.init)
}

note if you are not interested in the irregular layout WaterfallGrid gives you. Grid might be a better tool for you.

paololeonardi avatar Dec 05 '22 21:12 paololeonardi