PresentationRouter
public protocol PresentationRouter
Applications must implement this protocol to provide UI for actions that are invoked for URLs or deep linking.
The implementation is responsible for providing an instance of the right kind of presenter for a given action.
How this works is up to your UI platform and your application. On UIKit for example you may choose to
return .appCancelled
if the user has a modal view controller presented currently, or unsaved data in an
incomplete workflow. For the case where the current UI state can present the UI for the specified action,
the view controllers required must be created in the correct configuration and the final presenter instance returned
with a value of .appReady
-
Called to obtain the presenter, if possible, for the static action binding provided.
- return: The outcome of the presentation routing.
Declaration
Swift
func presentation<FeatureType, ActionType>(for actionBinding: StaticActionBinding<FeatureType, ActionType>, input: ActionType.InputType) -> PresentationResult<ActionType.PresenterType> where FeatureType : FeatureDefinition, ActionType : Action
-
Called to obtain the presenter, if possible, for the conditional action binding provided.
- return: The outcome of the presentation routing.
Declaration
Swift
func presentation<FeatureType, ActionType>(for conditionalActionBinding: ConditionalActionBinding<FeatureType, ActionType>, input: ActionType.InputType) -> PresentationResult<ActionType.PresenterType> where FeatureType : ConditionalFeature, ActionType : Action