phonegap-build / StatusBarPlugin

PhoneGap Build Plugin providing some customizations to the iOS status bar
https://build.phonegap.com/plugins/304
92 stars 46 forks source link

Statusbar disappears after using inappbrowser #31

Open orenagiv opened 10 years ago

orenagiv commented 10 years ago

The Statusbar disappears after opening a URL using in-app-browser.

My config.xml definitions are:

    <gap:plugin name="com.phonegap.plugin.statusbar" />
    <gap:config-file platform="ios" parent="UIViewControllerBasedStatusBarAppearance">
        <false />
    </gap:config-file>
    <gap:config-file platform="ios" parent="UIStatusBarHidden">
        <true />
    </gap:config-file>

I read somewhere, that if the UIViewControllerBasedStatusBarAppearance will be set to "YES" it might solve it. However, in my case, I would like the App to start without a statusbar, and only make it appear later on after the App is loaded. So I need those settings above.

ghost commented 10 years ago

this was driving me crazy too.

In the inappbrowser.m file find this:

_previousStatusBarStyle = -1;

if (IsAtLeastiOSVersion(@"7.0")) { [[UIApplication sharedApplication] setStatusBarStyle:_previousStatusBarStyle]; }

and change it to this:

if (IsAtLeastiOSVersion(@"7.0")) { [[UIApplication sharedApplication] setStatusBarStyle:_previousStatusBarStyle]; } _previousStatusBarStyle = -1;

hzlzh commented 10 years ago

me too, and this solved.

orenagiv commented 10 years ago

Thanks! I'll create a pull-request for PhoneGap Build?

orenagiv commented 10 years ago

Done: https://github.com/apache/cordova-plugin-inappbrowser/pull/49

hzlzh commented 10 years ago

@orenagiv Cool~