本文介绍了离子状态栏没有隐藏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加了插件 Cordova-plugin-statusbar 。在我更新离子和Cordova之前它正在工作。更新后,它无法正常工作。我完全困惑并恢复旧版本,然后它也无法正常工作!请帮助我们!

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!

推荐答案

确保已正确设置并尝试此操作:

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

这篇关于离子状态栏没有隐藏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-03 19:56