MwxBodyModifier

public struct MwxBodyModifier<VM> : ViewModifier where VM : AnyViewModel

A view modifier used to bind and wrap up a body or navigation view to its corresponding view model lifecycle.

  • The type of view model for this view modifier.

    When you bind to a view modifier, Swift infers this type from your implementation of the required vm property.

    Declaration

    Swift

    public var viewModel: VM
  • Gets the current body of the caller. Required. Default implementation provided.

    Declaration

    Swift

    public func body(content: Content) -> some View

    Parameters

    content

    A Content is a proxy for the view that will have the modifier represented by Self applied to it.

    Return Value

    The current body of self. content is a proxy for the view that will have the modifier represented by Self applied to it.