Reputation: 786
I'm using Capacitor with Ionic 5 and I need to change the status bar background color dynamically (different colors on different pages). On Android everything works fine (both capacitor and cordova plugins work), but on IOS I found out some limitations:
cordova-plugin-statusbar
is not compatible with Capacitor for IOSsetBackgroundColor
is not supported for IOS Is there any workaround to achieve my goal on IOS?
Upvotes: 2
Views: 4625
Reputation: 786
Finally, I found a solution. Status bar on IOS is transparent, so there is an easy solution to just set the background color on the body of the app, for example: document.body.style.backgroundColor = "#e34233";
.
Upvotes: 2
Reputation: 51
I am using "cordova-plugin-statusbar" varsion 2.4.2
I have solved this issue by this:
this.statusBar.backgroundColorByHexString('#3300000000');
You can dynamically set your status bar color
Upvotes: 0