File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,14 @@ @implementation RCTPSPDFKitManager
3535 [presentingViewController presentViewController: navigationController animated: YES completion: nil ];
3636}
3737
38+ RCT_EXPORT_METHOD (dismiss) {
39+ UIViewController *presentedViewController = RCTPresentedViewController ();
40+ NSAssert ([presentedViewController isKindOfClass: UINavigationController.class], @" Presented view controller needs to be a UINavigationController" );
41+ UINavigationController *navigationController = (UINavigationController *)presentedViewController;
42+ NSAssert (navigationController.viewControllers.count == 1 && [navigationController.viewControllers.firstObject isKindOfClass: PSPDFViewController.class], @" Presented view controller needs to contain a PSPDFViewController" );
43+ [navigationController dismissViewControllerAnimated: true completion: nil ];
44+ }
45+
3846- (dispatch_queue_t )methodQueue {
3947 return dispatch_get_main_queue ();
4048}
You can’t perform that action at this time.
0 commit comments