ViewModifier

public protocol ViewModifier

A modifier that you apply to a view or another view modifier, producing a different version of the original value.

  • The type of view representing the body.

    Declaration

    Swift

    associatedtype Body : View
  • The content view type.

    Declaration

    Swift

    associatedtype Content : View
  • Gets the current body of the caller.

    Declaration

    Swift

    func body(content: Self.Content) -> Self.Body
  • html(forHTMLOfContent:) Default implementation

    Specifies the transformation of HTML as implemented by this ViewModifier

    Default Implementation

    Declaration

    Swift

    func html(forHTMLOfContent: HTMLNode) -> HTMLNode

Available where Body == Content

  • body(content:) Default implementation

    Default Implementation

    Returns content as body.

    Declaration

    Swift

    func body(content: Self.Content) -> Self.Body