diff --git a/ios/Extenstion+Helpers/UIViewController+RNIModalHelpers.swift b/ios/Extenstion+Helpers/UIViewController+RNIModalHelpers.swift new file mode 100644 index 0000000..2f4c94b --- /dev/null +++ b/ios/Extenstion+Helpers/UIViewController+RNIModalHelpers.swift @@ -0,0 +1,20 @@ +// +// UIViewController+RNIModalHelpers.swift +// react-native-ios-modal +// +// Created by Dominic Go on 10/7/24. +// + +import UIKit + + +public extension UIViewController { + + var modalMetrics: RNIModalViewControllerMetrics { + .init(viewController: self); + }; + + var presentationControllerMetrics: RNIPresentationControllerMetrics? { + self.presentationController?.presentationControllerMetrics; + }; +}; diff --git a/ios/Temp/RNIModalViewControllerMetrics.swift b/ios/RNIModalSheetView/RNIModalViewControllerMetrics.swift similarity index 100% rename from ios/Temp/RNIModalViewControllerMetrics.swift rename to ios/RNIModalSheetView/RNIModalViewControllerMetrics.swift diff --git a/ios/Temp/RNIPresentationControllerMetrics.swift b/ios/RNIModalSheetView/RNIPresentationControllerMetrics.swift similarity index 100% rename from ios/Temp/RNIPresentationControllerMetrics.swift rename to ios/RNIModalSheetView/RNIPresentationControllerMetrics.swift diff --git a/ios/Temp/ModalFocusState.swift b/ios/Temp/ModalLifecycle/ModalFocusState.swift similarity index 100% rename from ios/Temp/ModalFocusState.swift rename to ios/Temp/ModalLifecycle/ModalFocusState.swift diff --git a/ios/Temp/ModalState.swift b/ios/Temp/ModalLifecycle/ModalState.swift similarity index 100% rename from ios/Temp/ModalState.swift rename to ios/Temp/ModalLifecycle/ModalState.swift diff --git a/ios/Temp/ModalViewControllerEventsNotifiable.swift b/ios/Temp/ModalLifecycle/ModalViewControllerEventsNotifiable.swift similarity index 100% rename from ios/Temp/ModalViewControllerEventsNotifiable.swift rename to ios/Temp/ModalLifecycle/ModalViewControllerEventsNotifiable.swift diff --git a/ios/Temp/ModalViewControllerLifecycleNotifier.swift b/ios/Temp/ModalLifecycle/ModalViewControllerLifecycleNotifier.swift similarity index 100% rename from ios/Temp/ModalViewControllerLifecycleNotifier.swift rename to ios/Temp/ModalLifecycle/ModalViewControllerLifecycleNotifier.swift diff --git a/ios/ModalSheet/ModalSheetBottomAttachedOverlayController.swift b/ios/Temp/ModalSheetBottomAttachedOverlay/ModalSheetBottomAttachedOverlayController.swift similarity index 100% rename from ios/ModalSheet/ModalSheetBottomAttachedOverlayController.swift rename to ios/Temp/ModalSheetBottomAttachedOverlay/ModalSheetBottomAttachedOverlayController.swift diff --git a/ios/ModalSheet/ModalSheetBottomAttachedOverlayLayoutConfig.swift b/ios/Temp/ModalSheetBottomAttachedOverlay/ModalSheetBottomAttachedOverlayLayoutConfig.swift similarity index 100% rename from ios/ModalSheet/ModalSheetBottomAttachedOverlayLayoutConfig.swift rename to ios/Temp/ModalSheetBottomAttachedOverlay/ModalSheetBottomAttachedOverlayLayoutConfig.swift diff --git a/ios/ModalSheet/ModalSheetBottomAttachedOverlayLayoutConfigPreset.swift b/ios/Temp/ModalSheetBottomAttachedOverlay/ModalSheetBottomAttachedOverlayLayoutConfigPreset.swift similarity index 100% rename from ios/ModalSheet/ModalSheetBottomAttachedOverlayLayoutConfigPreset.swift rename to ios/Temp/ModalSheetBottomAttachedOverlay/ModalSheetBottomAttachedOverlayLayoutConfigPreset.swift diff --git a/ios/ModalSheet/ModalSheetBottomDistance.swift b/ios/Temp/ModalSheetBottomAttachedOverlay/ModalSheetBottomDistance.swift similarity index 100% rename from ios/ModalSheet/ModalSheetBottomDistance.swift rename to ios/Temp/ModalSheetBottomAttachedOverlay/ModalSheetBottomDistance.swift diff --git a/ios/Temp/ModalSheetPresentationStateEventsNotifiable.swift b/ios/Temp/ModalSheetLifecycle/ModalSheetPresentationStateEventsNotifiable.swift similarity index 100% rename from ios/Temp/ModalSheetPresentationStateEventsNotifiable.swift rename to ios/Temp/ModalSheetLifecycle/ModalSheetPresentationStateEventsNotifiable.swift diff --git a/ios/Temp/ModalSheetPresentationStateMachine.swift b/ios/Temp/ModalSheetLifecycle/ModalSheetPresentationStateMachine.swift similarity index 100% rename from ios/Temp/ModalSheetPresentationStateMachine.swift rename to ios/Temp/ModalSheetLifecycle/ModalSheetPresentationStateMachine.swift diff --git a/ios/Temp/ModalSheetState.swift b/ios/Temp/ModalSheetLifecycle/ModalSheetState.swift similarity index 100% rename from ios/Temp/ModalSheetState.swift rename to ios/Temp/ModalSheetLifecycle/ModalSheetState.swift diff --git a/ios/Temp/ModalSheetViewControllerEventsNotifiable.swift b/ios/Temp/ModalSheetLifecycle/ModalSheetViewControllerEventsNotifiable.swift similarity index 100% rename from ios/Temp/ModalSheetViewControllerEventsNotifiable.swift rename to ios/Temp/ModalSheetLifecycle/ModalSheetViewControllerEventsNotifiable.swift diff --git a/ios/Temp/ModalSheetViewControllerLifecycleNotifier.swift b/ios/Temp/ModalSheetLifecycle/ModalSheetViewControllerLifecycleNotifier.swift similarity index 100% rename from ios/Temp/ModalSheetViewControllerLifecycleNotifier.swift rename to ios/Temp/ModalSheetLifecycle/ModalSheetViewControllerLifecycleNotifier.swift diff --git a/ios/Temp/RNIContentPositioningMode.swift b/ios/Temp/RNIContentViewController/RNIContentPositioningMode.swift similarity index 100% rename from ios/Temp/RNIContentPositioningMode.swift rename to ios/Temp/RNIContentViewController/RNIContentPositioningMode.swift diff --git a/ios/Temp/RNIContentSizingMode.swift b/ios/Temp/RNIContentViewController/RNIContentSizingMode.swift similarity index 100% rename from ios/Temp/RNIContentSizingMode.swift rename to ios/Temp/RNIContentViewController/RNIContentSizingMode.swift diff --git a/ios/Temp/RNIContentViewController.swift b/ios/Temp/RNIContentViewController/RNIContentViewController.swift similarity index 100% rename from ios/Temp/RNIContentViewController.swift rename to ios/Temp/RNIContentViewController/RNIContentViewController.swift diff --git a/ios/Temp/UIViewController+ModalHelpers.swift b/ios/Temp/UIViewController+ModalHelpers.swift index 1910d27..bdc75fd 100644 --- a/ios/Temp/UIViewController+ModalHelpers.swift +++ b/ios/Temp/UIViewController+ModalHelpers.swift @@ -141,12 +141,4 @@ extension UIViewController { return window.currentModalLevel; }; - - public var modalMetrics: RNIModalViewControllerMetrics { - .init(viewController: self); - }; - - public var presentationControllerMetrics: RNIPresentationControllerMetrics? { - self.presentationController?.presentationControllerMetrics; - }; }; diff --git a/ios/Temp/ViewControllerLifecycleNotifiable.swift b/ios/Temp/ViewControllerLifecycle/ViewControllerLifecycleNotifiable.swift similarity index 100% rename from ios/Temp/ViewControllerLifecycleNotifiable.swift rename to ios/Temp/ViewControllerLifecycle/ViewControllerLifecycleNotifiable.swift diff --git a/ios/Temp/ViewControllerLifecycleNotifier.swift b/ios/Temp/ViewControllerLifecycle/ViewControllerLifecycleNotifier.swift similarity index 100% rename from ios/Temp/ViewControllerLifecycleNotifier.swift rename to ios/Temp/ViewControllerLifecycle/ViewControllerLifecycleNotifier.swift