2016-07-24 12 views
0

Ich habe das Problem, dass auf meiner Ionic View gibt es keinen Platz an der Spitze. Die iOS-Statusleiste liegt also über dem Ionenkopf. Leider konnte ich es auf Android noch nicht testen.iOS Statusleiste über den Inhalt in Ionic 2

enter image description here

Das ist mein HTML-Code:

<ion-header> 
    <ion-navbar> 
    <ion-buttons start> 
     <button menuToggle> 
     <ion-icon name="menu"></ion-icon> 
     </button> 
    </ion-buttons> 
    <ion-title>spots</ion-title> 
    <ion-buttons end> 
     <button menuToggle> 
     <ion-icon name="menu"></ion-icon> 
     </button> 
    </ion-buttons> 
    </ion-navbar> 
</ion-header> 

und dies in den app.ts:

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. 
     StatusBar.styleDefault(); 
    }); 
    } 

Antwort

0

Sie müssen den folgenden Code hinzuzufügen unter das App.Modul

IonicModule.forRoot(MyApp, { 
     platforms: { 
      ios: { 
       statusbarPadding: true, 
       tabsHideOnSubPages: true 
      } 
      } 
     }) 

Dies ist die Lösung für die neuesten ionischen 3.2.0