Router
@MainActor
public protocol Router
Base router protocol.
-
Navigates the application to the view controller configured in
DestinationStepwith theContextprovided.Declaration
Swift
@MainActor func navigate<Context>(to step: DestinationStep<some UIViewController, Context>, with context: Context, animated: Bool, completion: ((_: RoutingResult) -> Void)?) throwsParameters
stepDestinationStepinstance.contextContextinstance.animatedif true - the navigation should be animated where it is possible.
completioncompletion block.
-
navigate(to:Extension methodanimated: completion: ) Navigates the application to the view controller configured in
Destinationwith theContextprovided.Declaration
Swift
@MainActor func navigate(to destination: Destination<some UIViewController, some Any>, animated: Bool = true, completion: ((RoutingResult) -> Void)? = nil) throwsParameters
destinationDestinationinstance.animatedif true - the navigation should be animated where it is possible.
completioncompletion block.
-
commitNavigation(to:Extension methodanimated: completion: ) Navigates the application to the view controller configured in
Destinationwith theContextprovided. Method does not throw errors, but propagates them to the completion block.Declaration
Swift
@MainActor func commitNavigation(to destination: Destination<some UIViewController, some Any>, animated: Bool = true, completion: ((RoutingResult) -> Void)? = nil)Parameters
destinationDestinationinstance.animatedif true - the navigation should be animated where it is possible.
completioncompletion block.
-
navigate(to:Extension method, asynchronouswith: animated: ) Navigates the application to the view controller configured in
DestinationStepwith theContextprovided.Declaration
Swift
@available(iOS 13.0.0, *) @MainActor func navigate<Context>(to step: DestinationStep<some UIViewController, Context>, with context: Context, animated: Bool) async throwsParameters
stepDestinationStepinstance.contextContextinstance.animatedif true - the navigation should be animated where it is possible.
-
navigate(to:Extension methodanimated: completion: ) Navigates the application to the view controller configured in
DestinationStepwith theContextset toAny?.Declaration
Swift
@MainActor func navigate(to step: DestinationStep<some UIViewController, Any?>, animated: Bool, completion: ((_: RoutingResult) -> Void)?) throwsParameters
stepDestinationStepinstance.animatedif true - the navigation should be animated where it is possible.
completioncompletion block.
-
navigate(to:Extension method, asynchronousanimated: ) Navigates the application to the view controller configured in
DestinationStepwith theContextset toAny?.Declaration
Swift
@available(iOS 13.0.0, *) @MainActor func navigate(to step: DestinationStep<some UIViewController, Any?>, animated: Bool) async throwsParameters
stepDestinationStepinstance.animatedif true - the navigation should be animated where it is possible.
-
navigate(to:Extension methodanimated: completion: ) Navigates the application to the view controller configured in
DestinationStepwith theContextset toVoid.Declaration
Swift
@MainActor func navigate(to step: DestinationStep<some UIViewController, Void>, animated: Bool, completion: ((_: RoutingResult) -> Void)?) throwsParameters
stepDestinationStepinstance.animatedif true - the navigation should be animated where it is possible.
completioncompletion block.
-
navigate(to:Extension method, asynchronousanimated: ) Navigates the application to the view controller configured in
DestinationStepwith theContextset toVoid.Declaration
Swift
@available(iOS 13.0.0, *) @MainActor func navigate(to step: DestinationStep<some UIViewController, Void>, animated: Bool) async throwsParameters
stepDestinationStepinstance.animatedif true - the navigation should be animated where it is possible.
-
commitNavigation(to:Extension methodwith: animated: completion: ) Navigates the application to the view controller configured in
DestinationStepwith theContextprovided. Method does not throw errors, but propagates them to the completion blockDeclaration
Swift
@MainActor func commitNavigation<Context>(to step: DestinationStep<some UIViewController, Context>, with context: Context, animated: Bool, completion: ((RoutingResult) -> Void)?)Parameters
stepDestinationStepinstance.contextContextinstance.animatedif true - the navigation should be animated where it is possible.
completioncompletion block.
-
commitNavigation(to:Extension methodanimated: completion: ) Navigates the application to the view controller configured in
DestinationStepwith theContextset toAny?. Method does not throw errors, but propagates them to the completion blockDeclaration
Swift
@MainActor func commitNavigation(to step: DestinationStep<some UIViewController, Any?>, animated: Bool, completion: ((RoutingResult) -> Void)?)Parameters
stepDestinationStepinstance.animatedif true - the navigation should be animated where it is possible.
completioncompletion block.
-
commitNavigation(to:Extension methodanimated: completion: ) Navigates the application to the view controller configured in
DestinationStepwith theContextset toVoid. Method does not throw errors, but propagates them to the completion blockDeclaration
Swift
@MainActor func commitNavigation(to step: DestinationStep<some UIViewController, Void>, animated: Bool, completion: ((RoutingResult) -> Void)?)Parameters
stepDestinationStepinstance.animatedif true - the navigation should be animated where it is possible.
completioncompletion block.