StatusBar over ion-nav on ionic 3

Viewed 42

Why my statusBar is over on ion-nav ?

My home.html is like this

<ion-header>
<ion-navbar color="royal">
  <button ion-button icon-only menuToggle>
    <ion-icon name="menu"></ion-icon>
  </button>
  <ion-title>
    Empreendimentos
  </ion-title>
</ion-navbar>

And app.components.ts is like this

import { StatusBar } from '@ionic-native/status-bar';


initializeApp() {
this.platform.ready().then(() => {
  // Okay, so the platform is ready and our plugins are available.
  // Here you can do any higher level native things you might need.
  this.statusBar.overlaysWebView(true);
  this.statusBar.backgroundColorByHexString('#4a148c');
  this.splashScreen.hide();
});

}

And this is a status bar on my app

enter image description here

1 Answers

I have solved as follows

this.statusBar.overlaysWebView(false);
Related