Ionic statusbar not hiding

2019-09-10 18:37发布

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!

Status bar not hiding

1条回答
走好不送
2楼-- · 2019-09-10 18:56

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

查看更多
登录 后发表回答