1 //  Copyright (c) 2018, Applidium. All rights reserved
2 //  OverlayContainerSheetPresentationControllerDelegate.swift
3 //  OverlayContainer
4 //
5 //  Created by Gaétan Zanella on 08/04/2020.
6 //
7 
8 import UIKit
9 
10 /// The presentation controller delegate is responsible for defining the aspect and the behavior of the controller.
11 public protocol OverlayContainerSheetPresentationControllerDelegate: AnyObject {
12 
13     /// Asks the delegate for the dismissal policy associated to the specified presentation controller.
14     ///
15     /// The default implementation of this method returns a `ThresholdOverlayContainerSheetDismissalPolicy` instance.
16     ///
17     /// - parameter presentationController: The presentation controller requesting this information.
overlayContainerSheetDismissalPolicynull18     func overlayContainerSheetDismissalPolicy(for presentationController: OverlayContainerSheetPresentationController) -> OverlayContainerSheetDismissalPolicy
19 
20     /// Asks the delegate if the presentation controller should dismiss the presented containers when a touch occured in the presentation container view.
21     ///
22     /// The default implementation of this method returns `true`.
23     ///
24     /// - parameter presentationController: The presentation controller requesting this information.
25     func overlayContainerSheetPresentationControllerShouldDismissOnTap(_ presentationController: OverlayContainerSheetPresentationController) -> Bool
26 }
27