init(alignment:horizontalSpacing:verticalSpacing:)
Creates a grid with the specified spacing and alignment.
Declaration
init(alignment: Alignment = .center, horizontalSpacing: CGFloat? = nil, verticalSpacing: CGFloat? = nil)Parameters
- alignment:
The guide for aligning subviews within the space allocated for a given cell. The default is Center.
- horizontalSpacing:
The horizontal distance between each cell, given in points. The value is
nilby default, which results in a default distance between cells that’s appropriate for the platform. - verticalSpacing:
The vertical distance between each cell, given in points. The value is
nilby default, which results in a default distance between cells that’s appropriate for the platform.