ForEach

public struct ForEach<T> : View

A structure that computes views on demand from an underlying collection of of data.

     ForEach(model.titles) { item in
         Text(item).margin(edge: .top, value: 23)
     }
  • The node behind the ForEach.

    Declaration

    Swift

    public var node: ArgoKitNode? { get }
  • The type of the node.

    Declaration

    Swift

    public var type: ArgoKitNodeType { get }
  • Initializer

    Declaration

    Swift

    public init(_ data: Array<T>?, @ArgoKitViewBuilder _ builder: @escaping (T) -> View)

    Parameters

    data

    The data that the ForEach instance uses to create views dynamically.

    builder

    The view builder that creates views dynamically.

  • Initializer

    Declaration

    Swift

    public init(_ range: T, @ArgoKitViewBuilder _ builder: @escaping (Int) -> View) where T == Range<Int>

    Parameters

    range

    A constant range.

    builder

    The view builder that creates views dynamically.

  • Undocumented

    Declaration

    Swift

    public func parentNode() -> ArgoKitNode?
  • Undocumented

    Declaration

    Swift

    public func applyLayout() -> CGSize
  • Undocumented

    Declaration

    Swift

    public func applyLayout(size: CGSize)
  • Undocumented

    Declaration

    Swift

    public func calculateLayout(size: CGSize)
  • Undocumented

    Declaration

    Swift

    public func flexDirection(_ value: ArgoFlexDirection) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func justifyContent(_ value: ArgoJustify) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func alignContent(_ value: ArgoAlign) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func alignItems(_ value: ArgoAlign) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func alignSelf(_ value: ArgoAlign) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func positionType(_ value: ArgoPositionType) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func wrap(_ value: ArgoWrapType) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func displayFlex() -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func displayNone() -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func flex(_ value: CGFloat) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func grow(_ value: CGFloat) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func shrink(_ value: CGFloat) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func basis(_ value: ArgoValue) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func position(top: ArgoValue, right: ArgoValue, bottom: ArgoValue, left: ArgoValue) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func position(edge: ArgoEdge, value: ArgoValue) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func margin(top: ArgoValue, right: ArgoValue, bottom: ArgoValue, left: ArgoValue) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func margin(edge: ArgoEdge, value: ArgoValue) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func padding(top: ArgoValue, right: ArgoValue, bottom: ArgoValue, left: ArgoValue) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func padding(edge: ArgoEdge, value: ArgoValue) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func size(width: ArgoValue, height: ArgoValue) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func width(_ value: ArgoValue) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func height(_ value: ArgoValue) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func minWidth(_ value: ArgoValue) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func minHeight(_ value: ArgoValue) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func maxWidth(_ value: ArgoValue) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func maxHeight(_ value: ArgoValue) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func width() -> CGFloat
  • Undocumented

    Declaration

    Swift

    public func height() -> CGFloat
  • Undocumented

    Declaration

    Swift

    public func minWidth() -> CGFloat
  • Undocumented

    Declaration

    Swift

    public func minHeight() -> CGFloat
  • Undocumented

    Declaration

    Swift

    public func maxWidth() -> CGFloat
  • Undocumented

    Declaration

    Swift

    public func maxHeight() -> CGFloat
  • Undocumented

    Declaration

    Swift

    public func aspect(ratio: CGFloat) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func isUserInteractionEnabled(_ value: Bool) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func tag(_ value: Int) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func tag() -> Int?
  • Undocumented

    Declaration

    Swift

    public func layer() -> CALayer?
  • Undocumented

    Declaration

    Swift

    public func canBecomeFocused() -> Bool?
  • Undocumented

    Declaration

    Swift

    public func isFocused() -> Bool?
  • The identifier of the focus group that this view belongs to. If this is nil, subviews inherit their superview’s focus group.

    Declaration

    Swift

    @available(iOS 14.0, *)
    @available(*, deprecated, message: "ForEach does not support the method!")
    public func focusGroupIdentifier(_ value: String?) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func focusGroupIdentifier() -> String?
  • Undocumented

    Declaration

    Swift

    public func semanticContentAttribute(_ value: UISemanticContentAttribute) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func semanticContentAttribute() -> UISemanticContentAttribute?
  • Undocumented

    Declaration

    Swift

    public func effectiveUserInterfaceLayoutDirection() -> UIUserInterfaceLayoutDirection?
  • Undocumented

    Declaration

    Swift

    public func backgroundColor(_ value: UIColor) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func backgroundColor(red r: Int, green g: Int, blue b: Int, alpha a: CGFloat = 1) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func backgroundColor(hex: Int, alpha a: Float = 1) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func alpha(_ value: CGFloat) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func opaque(_ value: Bool) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func clearsContextBeforeDrawing(_ value: Bool) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func hidden(_ value: Bool) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func display(_ value: Bool) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func contentMode(_ value: UIView.ContentMode) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func tintColor(_ value: UIColor) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func tintColor(red r: Int, green g: Int, blue b: Int, alpha a: CGFloat = 1) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func tintColor(hex: Int, alpha a: Float = 1) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func tintAdjustmentMode(_ value: UIView.TintAdjustmentMode) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func clipsToBounds(_ value: Bool) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func cornerRadius(_ value: CGFloat) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func cornerRadius(topLeft: CGFloat, topRight: CGFloat, bottomLeft: CGFloat, bottomRight: CGFloat) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func borderWidth(_ value: CGFloat) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func borderColor(_ value: UIColor) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func borderColor(red r: Int, green g: Int, blue b: Int, alpha a: CGFloat = 1) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func borderColor(hex: Int, alpha a: Float = 1) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func circle() -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func shadowColor(_ value: UIColor?) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func shadowColor(red r: Int, green g: Int, blue b: Int, alpha a: CGFloat = 1) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func shadowColor(hex: Int, alpha a: Float = 1) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func shadow(offset: CGSize, radius: CGFloat, opacity: Float) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func shadow(color: UIColor? = .gray, offset: CGSize, radius: CGFloat, opacity: Float, corners: UIRectCorner = .allCorners) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func gradientColor(startColor: UIColor?, endColor: UIColor?, direction: ArgoKitGradientType?) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func cleanGradientLayer() -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func addBlurEffect(style: UIBlurEffect.Style, alpha: CGFloat? = nil, color: UIColor? = nil) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func removeBlurEffect() -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func alias<T>(variable ptr: inout T?) -> ForEach<T> where T : View
  • Undocumented

    Declaration

    Swift

    public func addSubNodes(@ArgoKitViewBuilder builder: @escaping () -> View)
  • Undocumented

    Declaration

    Swift

    public func gesture(gesture: Gesture) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func removeGesture(gesture: Gesture) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func onTapGesture(numberOfTaps: Int = 1, numberOfTouches: Int = 1, action: @escaping () -> Void) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func onLongPressGesture(numberOfTaps: Int, numberOfTouches: Int, minimumPressDuration: TimeInterval = 0.5, allowableMovement: CGFloat = 10, action: @escaping () -> Void) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func endEditing(_ force: Bool) -> ForEach<T>
  • Undocumented

    Declaration

    Swift

    public func addAnimation(_ animation: Animation) -> ForEach<T>