View Source LazyVGrid
<LazyVGrid>
Grid that grows vertically.
Overview
Use the columns
attribute to configure the presentation of the grid.
<LazyVGrid
columns={[
%{ size: %{ fixed: 100 } },
%{ size: :flexible },
%{ size: %{ adaptive: %{ minimum: 50 } } }
]}
>
<%= for i <- 1..50 do %>
<Text id={i |> Integer.to_string}><%= i %></Text>
<% end %>
</LazyVGrid>
There are 3 types of grid item:
fixed(size, spacing, alignment)
: creates a single column that takes up the specified amount of space.flexible(minimum, maximum, spacing, alignment)
: creates a single column that fills the available space.adaptive(minimum, maximum, spacing, alignment)
: fills the available space with as many columns as will fit.
Attributes
SwiftUI Documentation
See SwiftUI.LazyVGrid
for more details on this View.
References
Link to this reference
alignment
The alignment between columns.
Link to this reference
columns
Configured columns to fill with the child elements.
Link to this reference
pinnedViews
Pins section headers/footers.
Discussion
Link to this reference
spacing
The spacing between rows.