Merge pull request #244 from Bruno-bm/master

Present notification view controller by inappbrowser v
This commit is contained in:
Aaron Faber 2019-02-06 17:40:09 +00:00 committed by GitHub
commit 6dc6045559
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,6 +104,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@implementation FileOpener2 (UIDocumentInteractionControllerDelegate)
- (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