Julian Le Calvez Julian Le Calvez - 6 months ago 62
iOS Question

Cordova InAppBrowser hidden until it finished to load

I'm using cordova to open a remote url inside my app. My problem is that I obtain a blank screen during the few secondsof content loading.

Is there a way to "hide" the browser view during the time it finishes to load the content ?

Thank you

Answer

There is hidden parameter:

var options = "location=yes,hidden=yes";

inAppBrowserRef = cordova.InAppBrowser.open(url, target, options);

addEventListener('loadstop', loadStopCallBack);

function loadStopCallBack() {

    inAppBrowserRef.show();
}

See the plugin docs for example details.