GeneralAction
public enum GeneralAction
A wrapper for general actions that can be applied to any UIViewController
-
Replaces the root view controller in the key
UIWindow
Declaration
Swift
public static func replaceRoot(windowProvider: WindowProvider = RouteComposerDefaults.shared.windowProvider, animationOptions: UIView.AnimationOptions? = nil, duration: TimeInterval = 0.3) -> ViewControllerActions.ReplaceRootAction
Parameters
windowProvider
WindowProvider
instanceanimationOptions
Set of
UIView.AnimationOptions
. Transition will happen without animation if not provided.duration
Transition duration.
-
presentModally(startingFrom:
presentationStyle: transitionStyle: transitioningDelegate: preferredContentSize: isModalInPresentation: presentationConfiguration: ) Presents a view controller modally
Declaration
Swift
public static func presentModally(startingFrom presentationStartingPoint: ViewControllerActions.PresentModallyAction.ModalPresentationStartingPoint = .current, presentationStyle: UIModalPresentationStyle? = .fullScreen, transitionStyle: UIModalTransitionStyle? = .coverVertical, transitioningDelegate: UIViewControllerTransitioningDelegate? = nil, preferredContentSize: CGSize? = nil, isModalInPresentation: Bool? = nil, presentationConfiguration: ((_: UIPresentationController) -> Void)? = nil) -> ViewControllerActions.PresentModallyAction
Parameters
presentationStartingPoint
A starting point in the modal presentation
presentationStyle
UIModalPresentationStyle
setting, default value: .fullScreentransitionStyle
UIModalTransitionStyle
setting, default value: .coverVerticaltransitioningDelegate
UIViewControllerTransitioningDelegate
instance to be used during the transitionisModalInPresentation
A Boolean value indicating whether the view controller enforces a modal behavior.
preferredContentSize
The preferredContentSize is used for any container laying out a child view controller.
presentationConfiguration
Block to configure
UIPresentationController
. -
Action
does nothing, but can be helpful for testing or writing the sequences of steps with theNilFactory
Declaration
Swift
public static func nilAction() -> ViewControllerActions.NilAction
-
presentModally(startingFrom:
presentationStyle: transitionStyle: transitioningDelegate: preferredContentSize: isModalInPresentation: popoverConfiguration: ) Presents a view controller modally
Declaration
Swift
static func presentModally(startingFrom presentationStartingPoint: ViewControllerActions.PresentModallyAction.ModalPresentationStartingPoint = .current, presentationStyle: UIModalPresentationStyle? = .fullScreen, transitionStyle: UIModalTransitionStyle? = .coverVertical, transitioningDelegate: UIViewControllerTransitioningDelegate? = nil, preferredContentSize: CGSize? = nil, isModalInPresentation: Bool? = nil, popoverConfiguration: ((_: UIPopoverPresentationController) -> Void)? = nil) -> ViewControllerActions.PresentModallyAction
Parameters
presentationStartingPoint
A starting point in the modal presentation
presentationStyle
UIModalPresentationStyle
setting, default value: .fullScreentransitionStyle
UIModalTransitionStyle
setting, default value: .coverVerticaltransitioningDelegate
UIViewControllerTransitioningDelegate
instance to be used during the transitionisModalInPresentation
A Boolean value indicating whether the view controller enforces a modal behavior.
preferredContentSize
The preferredContentSize is used for any container laying out a child view controller.
popoverControllerConfigurationBlock
Block to configure
UIPopoverPresentationController
.