Ionic - White edge on iPhone X in header

陌路散爱 提交于 2019-12-29 01:32:49

问题


Loading an app on iPhone X and I have white bars on the two sides of the notch. I am using Ionic Tabs. I have tried changing the body and ion-app background colour.

body, ion-app.app-root {
    background-color: color($colors, main);
}

First include viewport-fit=cover

Running "cordova-plugin-statusbar": "^2.2.3"

Also tried to change Statusbar background colour with <preference name="StatusBarBackgroundColor" value="#25707B" /> Don't know what is causing them.

Edit: Added image of the white edge.


回答1:


The status bar size has changed on iPhone X, so older versions of cordova-plugin-statusbar display incorrectly on iPhone X.

A fix was merged into the cordova-plugin-statusbar@2.3.0 release, so make sure you're using at least this version. You can check which version is installed in your project by running cordova plugin ls.

For a more comprehensive list of issues and solutions for Cordova apps on iPhone X see this answer.



来源:https://stackoverflow.com/questions/47494686/ionic-white-edge-on-iphone-x-in-header

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!