mirror of
https://gitee.com/shuto/cordova-plugin-file-opener2.git
synced 2025-01-31 12:02:49 +08:00
Merge pull request #244 from Bruno-bm/master
Present notification view controller by inappbrowser v
This commit is contained in:
commit
6dc6045559
@ -104,6 +104,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
@implementation FileOpener2 (UIDocumentInteractionControllerDelegate)
|
@implementation FileOpener2 (UIDocumentInteractionControllerDelegate)
|
||||||
- (UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)controller {
|
- (UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)controller {
|
||||||
return self.cdvViewController;
|
UIViewController *presentingViewController = self.viewController;
|
||||||
|
if (presentingViewController.view.window != [UIApplication sharedApplication].keyWindow){
|
||||||
|
presentingViewController = [UIApplication sharedApplication].keyWindow.rootViewController;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (presentingViewController.presentedViewController != nil && ![presentingViewController.presentedViewController isBeingDismissed]){
|
||||||
|
presentingViewController = presentingViewController.presentedViewController;
|
||||||
|
}
|
||||||
|
return presentingViewController;
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
Loading…
Reference in New Issue
Block a user