diff --git a/ios/src_library/React Native/RNIModal/RNIModal.swift b/ios/src_library/React Native/RNIModal/RNIModal.swift index 75dd9c53..bd90c2cd 100644 --- a/ios/src_library/React Native/RNIModal/RNIModal.swift +++ b/ios/src_library/React Native/RNIModal/RNIModal.swift @@ -46,16 +46,16 @@ public protocol RNIModalState: AnyObject { public protocol RNIModalRequestable: AnyObject { func requestModalToShow( - sender: any RNIModal, - onRequestApprovedBlock: () -> Void, - onRequestDeniedBlock: (_ reason: String) -> Void - ); + sender: Any, + animated: Bool, + completion: @escaping () -> Void + ) throws; func requestModalToHide( - sender: any RNIModal, - onRequestApprovedBlock: () -> Void, - onRequestDeniedBlock: (_ reason: String) -> Void - ); + sender: Any, + animated: Bool, + completion: @escaping () -> Void + ) throws; }; /// Contains functions that get called whenever a modal-related event occurs. diff --git a/ios/src_library/React Native/RNIModalView/RNIModalView.swift b/ios/src_library/React Native/RNIModalView/RNIModalView.swift index 28cd6c04..6a5493e8 100644 --- a/ios/src_library/React Native/RNIModalView/RNIModalView.swift +++ b/ios/src_library/React Native/RNIModalView/RNIModalView.swift @@ -1091,21 +1091,19 @@ extension RNIModalView: UISheetPresentationControllerDelegate { extension RNIModalView: RNIModalRequestable { public func requestModalToShow( - sender: any RNIModal, - onRequestApprovedBlock: () -> Void, - onRequestDeniedBlock: (String) -> Void - ) { - /// `TODO:2023-03-24-09-58-50` - Refactor `RNIModalView` to use `RNIModalManager`. - /// No-op - TBA + sender: Any, + animated: Bool, + completion: @escaping () -> Void + ) throws { + try self.presentModal(completion: completion); }; public func requestModalToHide( - sender: any RNIModal, - onRequestApprovedBlock: () -> Void, - onRequestDeniedBlock: (String) -> Void - ) { - /// `TODO:2023-03-24-09-58-50` - Refactor `RNIModalView` to use `RNIModalManager`. - /// No-op - TBA + sender: Any, + animated: Bool, + completion: @escaping () -> Void + ) throws { + try self.dismissModal(completion: completion); }; }; diff --git a/ios/src_library/React Native/RNIModalViewControllerWrapper/RNIModalViewControllerWrapper.swift b/ios/src_library/React Native/RNIModalViewControllerWrapper/RNIModalViewControllerWrapper.swift index 06ab89c7..9e7af367 100644 --- a/ios/src_library/React Native/RNIModalViewControllerWrapper/RNIModalViewControllerWrapper.swift +++ b/ios/src_library/React Native/RNIModalViewControllerWrapper/RNIModalViewControllerWrapper.swift @@ -76,17 +76,17 @@ public class RNIModalViewControllerWrapper: extension RNIModalViewControllerWrapper: RNIModalRequestable { public func requestModalToShow( - sender: any RNIModal, - onRequestApprovedBlock: () -> Void, - onRequestDeniedBlock: (String) -> Void + sender: Any, + animated: Bool, + completion: @escaping () -> Void ) { // TBA - no-op }; public func requestModalToHide( - sender: any RNIModal, - onRequestApprovedBlock: () -> Void, - onRequestDeniedBlock: (String) -> Void + sender: Any, + animated: Bool, + completion: @escaping () -> Void ) { // TBA - no-op };