On ios7 there is this extra padding that appears on the nav-bar.
This only shows on ios7, so some sort of device detection is going on and triggering the extra padding with the intention for it to show below the ios status bar. How can I control this behavior? More importantly, why isn’t the status bar over it in the first place?
This could be an ionic issue, or could be a cordova issues (using appgyver steroids), but I am not sure where to look first.
This has been asked various different ways and the cause isn’t really known. Appears to be some combination that causes a race state that isn’t handled properly. To fix it, put in this in the run function of your app.js.
That looks like a configuration for the Status Bar plugin. If that’s the case, I’ll have to setup the plugin in the appgyver cloud build to get it to work. I’ll give it a try,
however! Something else is going on because when the app starts, the status bar is actually ‘covering’ the top part of the ion-nav-bar, but then there is a layout is happens and the page scrolls down a bit to ‘show’ the extra padding.
Since ionic uses platform detection via the cordova deice plugin, there are a few extra cases where some extra css is added for ios specific cases, platform grading, so on and so forth.
If the device plugin is installed (I’m assuming it is), then those extra bits of css are getting applied, such as how to deal with the over hanging status bar. If the status bar plugin isn’t installed, then it cant control the way the status bar is displayed so it will just push the header down.
Ah-- ok, so the status bar plugin is required? That’s a pretty big gotcha =) I’ll go ahead and try to get that working then.
Thanks for the help, I’ll get back to the thread with further findings.
Try getting rid of the ion-view and moving it to its own template. Nothing should be placed inside the ion-nav-view except the nav bar.
Try this
<ion-nav-view class="slide-left-right">
<!-- Center content -->
<ion-nav-bar>
</ion-nav-bar>
</ion-nav-view>
<script id="home" type="text/ng-template">
<!-- The title of the ion-view will be shown on the navbar -->
<ion-view title="'Home'">
<ion-content ng-controller="HomeCtrl">
<!-- The content of the page -->
<a href="#/music">Go to music page!</a>
</ion-content>
</ion-view>
</script>