Group
public struct Group<Element>
An affordance for grouping component or section.
Example for simple grouping of cells.
Group {
Label("Cell 0")
Label("Cell 1")
Label("Cell 2")
}
-
Creates a group without elements.
Declaration
Swift
public init()
-
Creates a group with given cells.
Declaration
Swift
@inlinable public init<C>(@CellsBuilder cells: () -> C) where C : CellsBuildable
-
Creates a group with cells mapped from given elements.
Declaration
Swift
@inlinable public init<Data, C>(of data: Data, cell: (Data.Element) -> C) where Data : Sequence, C : CellsBuildable
-
Build an array of cell.
Declaration
Swift
@inlinable public func buildCells() -> [CellNode]
Return Value
An array of cell.
-
Creates a group with given sections.
Declaration
Swift
@inlinable public init<S>(@SectionsBuilder sections: () -> S) where S : SectionsBuildable
-
Creates a group with sections mapped from given elements.
Declaration
Swift
@inlinable public init<Data, S>(of data: Data, section: (Data.Element) -> S) where Data : Sequence, S : SectionsBuildable
-
Build an array of section.
Declaration
Swift
@inlinable public func buildSections() -> [Section]
Return Value
An array of section.