Ionic statusbar not hiding

﹥>﹥吖頭↗ 提交于 2020-01-17 06:47:03

问题


I have added the plugin Cordova-plugin-statusbar. It was working before I updated ionic and Cordova. After Updating, its not working. I'm totally confused and revert back to the old version, then too its not working! Kindly help me guys!

 if (window.StatusBar) {
        StatusBar.hide();
        ionic.Platform.fullScreen();
    }

This is the code I have used to hide!


回答1:


Make sure cordova-plugin-statusbar is correctly setup and try this:

$ionicPlatform.ready(function() {
  ionic.Platform.fullScreen();
  if (window.StatusBar) {
    return StatusBar.hide();
  }
});

Then try adding 'fullscreen' class to your body tag



来源:https://stackoverflow.com/questions/35251492/ionic-statusbar-not-hiding

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!