You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "jcesarmobile (JIRA)" <ji...@apache.org> on 2017/03/21 15:30:41 UTC

[jira] [Commented] (CB-12586) [iOS] Method hide doesn't works

    [ https://issues.apache.org/jira/browse/CB-12586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15934770#comment-15934770 ] 

jcesarmobile commented on CB-12586:
-----------------------------------

From the Apple docs

{quote}
The presenting view controller is responsible for dismissing the view controller it presented. If you call this method on the presented view controller itself, UIKit asks the presenting view controller to handle the dismissal.
{quote}

So we shouldn't ask inAppBrowserViewController, but to the one who presented it.

The problem is self.viewController is no longer presenting it, we should ask the temp view controller

[~shazron] what do you think?


> [iOS] Method hide doesn't works
> -------------------------------
>
>                 Key: CB-12586
>                 URL: https://issues.apache.org/jira/browse/CB-12586
>             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
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org