ForEach

public struct ForEach : Shortcut

A structure that computes shortcuts from an underlying collection of data.

  • Declaration

    Swift

    public typealias Body = Never
  • Declaration

    Swift

    public var body: Never { get }
  • Initializes the shortcut.

    Declaration

    Swift

    public init<Data>(_ data: Data) where Data : Collection, Data.Element : Shortcut

    Parameters

    data

    A collection of shortcuts.

  • Initializes the shortcut.

    Declaration

    Swift

    public init<Data, Content>(_ data: Data, @ShortcutBuilder content: (Data.Element) -> Content) where Data : Collection, Content : Shortcut

    Parameters

    data

    The data that the ForEach value uses to create shortcuts.

    content

    The shortcut builder that creates shortcuts.