-
Notifications
You must be signed in to change notification settings - Fork 25
EnvironmentValues
ohitsdaniel edited this page Apr 29, 2021
·
1 revision
The Navigator
allowing navigation path mutations
var navigator: Navigator
Can be used to directly navigate from a Vanilla SwiftUI.
struct RootView: View {
@Environment(\.navigator) var navigator: Navigator
@Environment(\.currentScreenID) var screenID: ScreenID
var body: some View {
Button(
action: { navigator.go(to: DetailScreen(), on: screenID) },
label: Text("Go to DetailScreen")
}
}
viewAppeared(animated:)
is not called in SwiftUI and UIKit when a ViewController dismisses a sheet. This environment value allows you to override this behaviour.
var treatSheetDismissAsAppearInPresenter: Bool
Use .environment(\.treatSheetDismissAsAppearInPresenter, true)
on your Root view to get onAppear events for sheet dismissals.
Example
Root(
dataSource: dataSource,
pathBuilder: pathBuilder
)
.environment(\.treatSheetDismissAsAppearInPresenter, true)
The ScreenID
of the screen preceding the screen the view is embedded in
var parentScreenID: ScreenID?
The ScreenID
of the screen the view is embedded in
var currentScreenID: ScreenID
The Screen
preceding the screen the view is embedded in
var parentScreen: AnyScreen?
The Screen
the view is embedded in
var currentScreen: AnyScreen
Generated at 2021-04-29T07:59:04+0000 using swift-doc 1.0.0-beta.6.
Types
- AnyPathBuilder
- AnyScreen
- Deeplink
- DeeplinkComponent
- DeeplinkComponent.Argument
- DeeplinkHandler
- DeeplinkParser
- EitherAB
- EitherABC
- EitherABCD
- EitherABCDE
- EitherABCDEF
- EitherABCDEFG
- EitherABCDEFGH
- EitherABCDEFGHI
- EitherABCDEFGHIJ
- IdentifiedScreen
- NavigationNode
- NavigationTreeBuilder
- Navigator
- Navigator.Datasource
- Navigator.DidAppearInvocation
- Navigator.DismissInvocation
- Navigator.GoBackToInvocation
- Navigator.GoToInvocation
- Navigator.GoToPathInvocation
- Navigator.NavigationIdentifier
- Navigator.ReplaceContentInvocation
- Navigator.ReplacePathInvocation
- Navigator.ReplaceScreenInvocation
- NavigatorKey
- OnDismissView
- PathBuilders
- PathBuilders.EmptyBuilder
- PathBuilders.WildcardView
- PathComponentUpdate
- PathUpdate
- Root
- ScreenPresentationStyle
- TreatSheetDismissAsAppearInPresenterKey
- _PathBuilder