MwxTabModifier
public struct MwxTabModifier<VM> : ViewModifier where VM : AnyViewModel
A link modifier that you apply to a view or another view modifier coordinated by a tab coordinator producing a tab view with tab items for an input title and image.
-
The tab coordinator for this view.
When you create a coordinator, Swift infers this type from the generic
VM
type property.Declaration
Swift
@ObservedObject public var coordinator: MwxCoordinator<VM> { get set }
-
The tab coordinators managed by the managing coordinator of this view model.
Declaration
Swift
public var tabs: [AnyCoordinator]
-
Creates a tab view with tab items for the modified view.
Declaration
Swift
public func body(content: Content) -> some View
Parameters
content
A closure returning the content of the view.
Return Value
The view coordinated by a tab coordinator with a tab view and tab items.
-
Creates a tab item for a tab coordinator tagged by its index and initialized with input title and image.
Declaration
Swift
public func tab(index: Int, coordinator: AnyCoordinator) -> some View
Parameters
index
A
Int
of the index and tag of tab itemcoordinator
A
AnyCoordinator
of the coodinator for this tab item.Return Value
The tab item for a tab coordinator of a tab view.