Ionic-change App top bar color

Hello, I am developing an application with Ionic3 and when I start the app in the emulator nice wheel, but it is common in applications the black bar is in the color of the header but in a darker tone. How to do this?

insert the description of the image here

Another thing, when I simulate on iOS the top bar is on the elements of the application, how to fix?

insert the description of the image here

Author: Gonzaga Neto, 2018-08-03

1 answers

You can change the color of the top bar and fix the bar on IOS with the cordova-plugin-statusbar plugin. Include in config.xml the property StatusBarOverlaysWebView to change the color and StatusBarOverlaysWebView to false so that the top menu does not hover over your IOS app.

Install plugin:

ionic cordova plugin add cordova-plugin-statusbar
npm install --save @ionic-native/status-bar

Include in the app.modulate.ts:

import { StatusBar } from '@ionic-native/status-bar';
...
providers: [
  StatusBar,
...

Include in config.xml:

<platform name="android">
    <preference name="StatusBarBackgroundColor" value="#000000" />
</platform>

<platform name="ios">
    <preference name="StatusBarOverlaysWebView" value="false" />
    <preference name="StatusBarBackgroundColor" value="#000000" />
</platform>
 3
Author: Renata, 2018-08-03 15:26:20