Ionic ion-view header behind ios status bar

后端 未结 10 2298
礼貌的吻别
礼貌的吻别 2021-01-04 09:15

How do I avoid ionic header from getting behind ios status bar like this?

I created the header with following code:



        
10条回答
  •  长情又很酷
    2021-01-04 09:54

    Finally the problem is solved.

    in app.js

    $ionicPlatform.ready(function() {
      if (window.cordova && $cordovaKeyboard) {
        $cordovaKeyboard.hideAccessoryBar(true);
      }
      if (window.StatusBar) {
        StatusBar.styleDefault();
      }
    }
    

    and, if that doesn't solve the problem yet. In index.html, cordova.js should be imported on the very last.

    
        ...
    
        
    
    

    This solve my problem.

提交回复
热议问题