From 8a61ff7caf037cf31b1464c355b72ea5fdee4efe Mon Sep 17 00:00:00 2001 From: Dominic Go Date: Fri, 27 Sep 2024 05:43:02 +0800 Subject: [PATCH] =?UTF-8?q?=E2=AD=90=EF=B8=8F=20Impl:=20`SheetViewControll?= =?UTF-8?q?erEventsNotifiable`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SheetViewControllerEventsNotifiable.swift | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 ios/Temp/SheetViewControllerEventsNotifiable.swift diff --git a/ios/Temp/SheetViewControllerEventsNotifiable.swift b/ios/Temp/SheetViewControllerEventsNotifiable.swift new file mode 100644 index 00000000..87dd1edf --- /dev/null +++ b/ios/Temp/SheetViewControllerEventsNotifiable.swift @@ -0,0 +1,54 @@ +// +// SheetViewControllerEventsNotifiable.swift +// react-native-ios-modal +// +// Created by Dominic Go on 9/27/24. +// + +import UIKit + + +public protocol SheetViewControllerEventsNotifiable: AnyObject { + + func notifyOnSheetDidAttemptToDismissViaGesture( + sender: UIViewController, + presentationController: UIPresentationController + ); + + func notifyOnSheetDidDismissViaGesture( + sender: UIViewController, + presentationController: UIPresentationController + ); + + func notifyOnSheetWillDismissViaGesture( + sender: UIViewController, + presentationController: UIPresentationController + ); +}; + +// MARK: - SheetViewControllerEventsNotifiable +// ------------------------------------------- + +public extension SheetViewControllerEventsNotifiable { + + func notifyOnSheetDidAttemptToDismissViaGesture( + sender: UIViewController, + presentationController: UIPresentationController + ) { + // no-op + }; + + func notifyOnSheetDidDismissViaGesture( + sender: UIViewController, + presentationController: UIPresentationController + ) { + // no-op + }; + + func notifyOnSheetWillDismissViaGesture( + sender: UIViewController, + presentationController: UIPresentationController + ) { + // no-op + }; +};