ionic2如何从iphone的顶部状态栏中删除空白区域 [英] ionic2 how to remove white space from status bar from top in iphone

查看:113
本文介绍了ionic2如何从iphone的顶部状态栏中删除空白区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究离子2,这是我当地的设置 -

I am working on ionic 2 and here is my local set up as-

******************************************************
Your system information:

Cordova CLI: 6.4.0 
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
ios-deploy version: Not installed
ios-sim version: 5.0.8 
OS: OS X Yosemite
Node Version: v6.2.2
Xcode version: Xcode 7.2 Build version 7C68
******************************************************

我想从iphone顶部删除空白区域,我怎么做?

I wanted to remove white space from top in iphone, How I can?

推荐答案

我很高兴地说我完成了这个任务的任务,我真的很感激。我来看看解决方案在本文中

I am glad to say that I got my task done with this answer, I am really thankful for that. I came to see solution in this article.


  1. 打开app.ts文件并转到底部

  2. 将此行代码添加为 -







let config = {statusbarPadding: false};

因为我们已将config作为变量,我们需要在app被读取时加载,所以添加此变量as-

as we have taken config as a variable, which we need to get load when app get read, so add this variable as-

ionicBootstrap(MyApp,null, config);

现在最终代码将是这样的 -

Now the final code will be like this-

let config = {statusbarPadding: false};
ionicBootstrap(MyApp,null, config);

这对我有用。

这篇关于ionic2如何从iphone的顶部状态栏中删除空白区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆