Skip to content

Commit

Permalink
💫 Update: Impl. getModalInstance
Browse files Browse the repository at this point in the history
Summary: Impl. `RNIModalManager.getModalInstance`.
  • Loading branch information
dominicstop committed Apr 12, 2023
1 parent 5662635 commit c23dc7d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ios/src_library/React Native/RNIModal/RNIModalManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,15 @@ public class RNIModalManager {
$0.presentingViewController === viewController
};
};

public func getModalInstance(
forPresentingViewController viewController: UIViewController
) -> (any RNIModal)? {
self.modalInstances.first {
$0.presentingViewController === viewController;
};
};

public func getModalInstances(
forWindow window: UIWindow
) -> [any RNIModal] {
Expand Down

0 comments on commit c23dc7d

Please sign in to comment.