NavigationRequest
public struct NavigationRequest : Hashable
extension NavigationRequest: CustomDebugStringConvertible
Used by a RoutableWithConfiguration
inside its RoutableWithConfiguration.navigationConfiguration
to describe the kind of navigation action (Show
, Hide
) to handle.
extension ListViewController: RoutableWithConfiguration {
// needed by the `Routable` protocol
// to identify this ViewController in the hierarchy
var routeIdentifier: RouteElementIdentifier {
return "listScreen"
}
// the `NavigationRequest`s that this ViewController is handling
// with the `NavigationInstruction` to execute
var navigationConfiguration: [NavigationRequest: NavigationInstruction] {
return [
.show("addItemScreen"): .presentModally({ [unowned self] _ in
let vc = AddItemViewController(store: self.store)
return vc
})
]
}
-
Represents a NavigationRequest to match a
Show
action dispatched.Declaration
Swift
public static func show<T>(_ source: T) -> NavigationRequest where T : RawRepresentable, T.RawValue == RouteElementIdentifier
-
Represents a NavigationRequest to match a
Show
action dispatched.Declaration
Swift
public static func show(_ source: RouteElementIdentifier) -> NavigationRequest
-
Represents a NavigationRequest to match a
Hide
action dispatched.Declaration
Swift
public static func hide<T>(_ source: T) -> NavigationRequest where T : RawRepresentable, T.RawValue == RouteElementIdentifier
-
Represents a NavigationRequest to match a
Hide
action dispatched.Declaration
Swift
public static func hide(_ source: RouteElementIdentifier) -> NavigationRequest
-
Declaration
Swift
public func hash(into hasher: inout Hasher)
-
Implementation of the equality between two NavigationRequest.
Declaration
Swift
public static func == (l: NavigationRequest, r: NavigationRequest) -> Bool
-
Declaration
Swift
public var debugDescription: String { get }