GeneralAction

public enum GeneralAction

A wrapper for general actions that can be applied to any UIViewController

Actions

  • 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 instance

    animationOptions

    Set of UIView.AnimationOptions. Transition will happen without animation if not provided.

    duration

    Transition duration.

  • 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: .fullScreen

    transitionStyle

    UIModalTransitionStyle setting, default value: .coverVertical

    transitioningDelegate

    UIViewControllerTransitioningDelegate instance to be used during the transition

    isModalInPresentation

    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 the NilFactory

    Declaration

    Swift

    public static func nilAction() -> ViewControllerActions.NilAction
  • 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: .fullScreen

    transitionStyle

    UIModalTransitionStyle setting, default value: .coverVertical

    transitioningDelegate

    UIViewControllerTransitioningDelegate instance to be used during the transition

    isModalInPresentation

    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.