ios状态栏后面的离子离子视图头 [英] Ionic ion-view header behind ios status bar
本文介绍了ios状态栏后面的离子离子视图头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何避免离子头像这样落后ios状态栏?
How do I avoid ionic header from getting behind ios status bar like this?
我使用以下代码创建了标题:
I created the header with following code:
<ion-view title="{{title}}" hide-nav-bar="false">
推荐答案
最后问题解决了。
在app.js中
$ionicPlatform.ready(function() {
if (window.cordova && $cordovaKeyboard) {
$cordovaKeyboard.hideAccessoryBar(true);
}
if (window.StatusBar) {
StatusBar.styleDefault();
}
}
如果这不能解决问题在index.html中,应该在最后一次导入cordova.js。
and, if that doesn't solve the problem yet. In index.html, cordova.js should be imported on the very last.
<head>
...
<script src="cordova.js"></script>
</head>
这解决了我的问题。
这篇关于ios状态栏后面的离子离子视图头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文