Closed mattjung closed 1 year ago
Allows for the ability to access the coordinator i.e self within the view factory
Example of use:
final class NavigationCoordinatorWithClose<T: Coordinatable>: ViewWrapperCoordinator<T, AnyView> { init(_ embedded: T) { super.init(embedded) { coordinator in { view in AnyView( NavigationView { view .toolbar { ToolbarItem(placement: .navigationBarLeading) { Button("Close") { coordinator.parent?.dismissChild(coordinator: coordinator, action: nil) } } } } ) }} } }
Allows for the ability to access the coordinator i.e self within the view factory
Example of use: