From 60424ef509677b1c02d5834ed923fc4b44b5501f Mon Sep 17 00:00:00 2001 From: Dominic Go Date: Fri, 27 Sep 2024 19:38:46 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=20Refactor:=20Rename=20to=20`Modal?= =?UTF-8?q?SheetViewControllerEventsNotifiable`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...swift => ModalSheetViewControllerEventsNotifiable.swift} | 6 +++--- ios/Temp/ModalSheetViewControllerLifecycleNotifier.swift | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) rename ios/Temp/{SheetViewControllerEventsNotifiable.swift => ModalSheetViewControllerEventsNotifiable.swift} (88%) diff --git a/ios/Temp/SheetViewControllerEventsNotifiable.swift b/ios/Temp/ModalSheetViewControllerEventsNotifiable.swift similarity index 88% rename from ios/Temp/SheetViewControllerEventsNotifiable.swift rename to ios/Temp/ModalSheetViewControllerEventsNotifiable.swift index 8ab74d07..baedb4ea 100644 --- a/ios/Temp/SheetViewControllerEventsNotifiable.swift +++ b/ios/Temp/ModalSheetViewControllerEventsNotifiable.swift @@ -1,5 +1,5 @@ // -// SheetViewControllerEventsNotifiable.swift +// ModalSheetViewControllerEventsNotifiable.swift // react-native-ios-modal // // Created by Dominic Go on 9/27/24. @@ -8,7 +8,7 @@ import UIKit -public protocol SheetViewControllerEventsNotifiable: AnyObject { +public protocol ModalSheetViewControllerEventsNotifiable: AnyObject { func notifyOnSheetDidAttemptToDismissViaGesture( sender: UIViewController, @@ -35,7 +35,7 @@ public protocol SheetViewControllerEventsNotifiable: AnyObject { // MARK: - SheetViewControllerEventsNotifiable // ------------------------------------------- -public extension SheetViewControllerEventsNotifiable { +public extension ModalSheetViewControllerEventsNotifiable { func notifyOnSheetDidAttemptToDismissViaGesture( sender: UIViewController, diff --git a/ios/Temp/ModalSheetViewControllerLifecycleNotifier.swift b/ios/Temp/ModalSheetViewControllerLifecycleNotifier.swift index 37de1246..07bb7980 100644 --- a/ios/Temp/ModalSheetViewControllerLifecycleNotifier.swift +++ b/ios/Temp/ModalSheetViewControllerLifecycleNotifier.swift @@ -14,7 +14,7 @@ open class ModalSheetViewControllerLifecycleNotifier: ViewControllerLifecycleNot private var _didSetup = false; private(set) public var sheetLifecycleEventDelegates: - MulticastDelegate = .init(); + MulticastDelegate = .init(); /// The return value used for /// `UIAdaptivePresentationControllerDelegate.presentationControllerShouldDismiss` @@ -80,7 +80,7 @@ open class ModalSheetViewControllerLifecycleNotifier: ViewControllerLifecycleNot public override func addEventDelegate(_ delegate: AnyObject){ super.addEventDelegate(delegate); - guard let delegate = delegate as? SheetViewControllerEventsNotifiable else { + guard let delegate = delegate as? ModalSheetViewControllerEventsNotifiable else { return; };