这是我第一次和Ionic一起发展。
我试图删除我的应用程序中的状态栏。现在,删除了iPad应用程序的状态栏。然而,在我的标志性视图的顶部仍然有一个空间(我认为它的大小与状态栏相同)。我已经使用此代码设置了Javascript文件以隐藏状态栏,但它不起作用。
ionic.Platform.ready(function() {
// hide the status bar using the StatusBar plugin
StatusBar.hide();
// ionic.platform.fullScreen();
});我怎样才能解决这个问题,或者我做错了什么?谢谢。
以下是在web浏览器和iOS模拟器上的图像比较
发布于 2015-01-18 20:42:01
我也有同样的问题。我用:
ionic.Platform.ready(function() {
//hide the status bar using the StatusBar plugin
if(window.StatusBar) {
// org.apache.cordova.statusbar required
StatusBar.hide();
ionic.Platform.fullScreen();
}
});ionic.Platform.fullScreen();是我项目中的东西。移除顶部的空间。
发布于 2014-08-21 06:51:51
您是否安装了这样的statusbar插件:
$ cordova plugin add org.apache.cordova.statusbar只有在此之后,才能删除状态栏:
angular.module('myApp', ['ionic'])
.controller('MyCtrl', function($scope) {
ionic.Platform.ready(function() {
// hide the status bar using the StatusBar plugin
StatusBar.hide();
});
});发布于 2017-04-30 18:05:55
也许他的解决办法会有帮助..。this.statusBar.overlaysWebView(true);
https://stackoverflow.com/questions/25405605
复制相似问题