Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Span over columns #66

Open
MKGitHub opened this issue Dec 3, 2022 · 1 comment
Open

Span over columns #66

MKGitHub opened this issue Dec 3, 2022 · 1 comment

Comments

@MKGitHub
Copy link

MKGitHub commented Dec 3, 2022

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

@paololeonardi
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants