paololeonardi / WaterfallGrid

A waterfall grid layout view for SwiftUI.
MIT License
2.39k stars 117 forks source link

right to left grid #34

Closed eskanndar closed 4 years ago

eskanndar commented 4 years ago

I need it to be right to left grid. is there any possibility to do that?

paololeonardi commented 4 years ago

You could force the grid environment to have an RTL layout direction:

WaterfallGrid(rectangles) { rectangle in
  RectangleView(rectangle: rectangle)
}
.environment(\.layoutDirection, .rightToLeft)

Is it what you want?

Simulator Screen Shot - iPhone 11 Pro - 2020-06-15 at 15 25 08

eskanndar commented 4 years ago

Yes, thank you. great job.