RequiresDismissConfirmation

protocol RequiresDismissConfirmation : UIViewController

The RequiresDismissConfirmation protocol can be implemented by view controllers that are managed by the ExposureSubmissionCoordinator to react to dismissals (either by pressing the close button or the swipe down gesture). The protocol comes with a default implementation that displays a generic confirmation popup.

  • attemptDismiss(_:) Default implementation

    willDismiss(_:) is called by the ExposureSubmissionCoordinator when the view controller is about to be removed from the navigation controller view stack.

    Default Implementation

    Declaration

    Swift

    func attemptDismiss(_ shouldDismiss: @escaping ((Bool) -> Void))

    Parameters

    shouldDismiss

    callback that takes true if the dismissal of the current view controller should proceed.