iOS背景颜色上的状态栏 [英] Status Bar on iOS Background Color

查看:512
本文介绍了iOS背景颜色上的状态栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难将iOS状态栏背景颜色设置为透明。我正在使用最新版本的cordova状态栏和离子,并将所有内容保留为默认设置,但是由于某种原因我得到了白色背景颜色。我怎样才能设置移植的背景颜色,不管怎样,这是默认值。

I’m having a hard time setting the iOS status bar background color to transparent. I’m using the latest version of cordova statusbar and ionic, and leaving everything to their default setting, however i’m getting a white background color for some reason. How can i set the background color to transplant, i though this is the default value anyhow.

推荐答案

好的,所以参考:

  • https://issues.apache.org/jira/browse/CB-12886 and
  • https://issues.apache.org/jira/browse/CB-12890

问题出现在iOS 11和cordova-ios-4.5.0中,简单来说就是通过在index.html中添加封面值到viewport-fit来解决:

The issue occurs in iOS 11, and cordova-ios-4.5.0 and is simply solved by adding the cover value to viewport-fit as follows in your index.html:

   <meta name="viewport" content="viewport-fit=cover, initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width" />

这篇关于iOS背景颜色上的状态栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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