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.
相关问题
- Core Data lightweight migration crashes after App
- Plugin with id 'com.google.gms.google-services
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
If you are using statusbar plugin, you should also update it to latest version (2.3.0 has just been released). This new version of the plugin handles the iPhone X notch.
BTW, the problem has nothing to do with the cordova-ios version, it's a new "feature" of the
WebView
when you compile the apps with iOS 11 SDK (it won't appear if you use Xcode 8 as it uses SDK 10).viewport-fit=cover
is the way to go for removing this fake statusbar.As maintained by luckystarr. Plugin cordova-plugin-statusbar will help you achieve what you want to do.
After adding plugin add following preference in
config.xml
to get black backgroundTo change the color of icons and text in status bar you can use
Available values are default, lightcontent, blacktranslucent, blackopaque.
Okay so after referring to:
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: