iOS: how to remove extra space for status bar


#1

Hi,
I do not want to show a status bar in my iOS app. Though the status bar is not being displayed there is the extra 20pt for the status bar. How can I solve this?


Can't fully hide StatusBar
#2

What have you done in your attempt to remove the status bar? Maybe something’s missing :slight_smile: If you could paste what you’ve added, that’d be great!


#3

Thanks for your reply. I call “StatusBar.hide();” on app start and have checked Hide Status Bar in the iOS project settings.


#4

Maybe try adding this in your config.xml inside your iOS platform: <preference name="StatusBarOverlaysWebView" value="true"/>, I’m not sure if it accomplishes the same as what you did in the project. Keep the StatusBar.hide();.


#5

Thank you, but did not help.


#6

Maybe try this after you do the hide()

StatusBar.overlaysWebView(true);

Though I thought hide() would do that as well… If it’s still no good, I don’t know :confused:


#7

IonicModule.forRoot(MyApp, {statusbarPadding: false}),

did the trick for me! Thanks!


#8

Related topic:


#9

thx it worked for me too


#10

Please install three Cordova plugins:
1、cordova-plugin-disable-ios11-statusbar
2、cordova-plugin-statusbar
3、cordova-plugin-wkwebview-engine

set property:
viewport-fit=cover