cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jcesarmobile (JIRA)" <>
Subject [jira] [Commented] (CB-12586) [iOS] Method hide doesn't works
Date Thu, 23 Mar 2017 23:27:41 GMT


jcesarmobile commented on CB-12586:

Yeah, what Roberto did is right, but might not cover all cases, I've read that if the view
controller presenting the new view controller is in a navigation controller, then presentingViewController
will be null. It won't be a problem for regular Cordova apps, but might be a problem for somebody
embedding the Cordova WebView. 
[self.inAppBrowserViewController dismissViewControllerAnimated:YES completion:nil]; should
work even if the view controller presenting is a navigation controller, so I think it's safest
to use that.

> [iOS] Method hide doesn't works
> -------------------------------
>                 Key: CB-12586
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin InAppBrowser
>    Affects Versions: 1.7.0
>         Environment: I have tested on the iPhone 7 with iOS 10.2.1 and the iPhone 6 Plus
with iOS 10.2
>            Reporter: Roberto Orden Erena
> I have using the `hide()` method in order to hide the webview window when the mobile
hasn't wifi connection, in Android works fine, but in iOS not.
> My temporal solution for this is:
> {code}
>  // Run later to avoid the "took a long time" log message.
>     dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
>         if (weakSelf.inAppBrowserViewController != nil) {
>             _previousStatusBarStyle = -1;
>             [weakSelf.viewController dismissViewControllerAnimated:YES completion:nil];
>             // I have added this line in order to hide the webview
>             [weakSelf.inAppBrowserViewController dismissViewControllerAnimated:YES completion:nil];
>         }
>     });
> {code}
> I think that : "what is the weakSelf.viewController?", when shows and when creates the
inAppBrowser the plugin uses self.inAppBrowserViewController. Why use at this point viewController
instead of?
> Note: It's my first issue report, If I have done wrong it, please notify me in order
to do better the next time.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message