An array of grid items to size and position each column of the grid.
Initializerinit(rows:
init(rows:alignment:spacing:pinnedViews:content:)
Creates a grid that grows horizontally, given the provided properties.
Availability 有効性
- iOS 14.0+
- iPadOS 14.0+
- macOS 11.0+
- Mac Catalyst 14.0+
- tvOS 14.0+
- watchOS 7.0+
Technology
- Swift
UI
Declaration 宣言
init(rows: [GridItem
], alignment: VerticalAlignment
= .center, spacing: CGFloat
? = nil, pinnedViews: PinnedScrollableViews
= .init(), content: () -> Content)
Parameters パラメータ
rows
alignment
The alignment of the grid within its parent view.
spacing
The spacing between the grid and the next item in its parent view.
pinnedViews
Views to pin to the bounds of a parent scroll view.
content
The content of the grid.