I just downloaded the seed project and ran it, and it worked fine. However, after adding the code to hide the status bar, it no longer fits the screen.
How can remove it properly without messing up the layout?
I resolved this issue by myself. I guess it was the fault of the documentation.
When we want to use Ionic as fullscreen mode, we have to write these code.
$ionicPlatform.ready ->
ionic.Platform.fullScreen()
if window.StatusBar
StatusBar.hide()
Sorry, it’s coffee script but it is same thing in Javascript, call ionic.Platform.fullScreen() and add fullscreen css class in the body tag.
I could not know this is the correct solution of fullscreen mode in iOS. But I could fix this issue.
You can just do the following. The only issue that I have found is if you have a footer, it is cutoff. I reported this issue on github. Also, be sure to look at the arguments that you can pass to fullScreen function as well.
if (ionic.Platform.isIOS())
ionic.Platform.fullScreen();
I decided to hide the iOS status bar…using the JS you posted my entire app screen is now white, its like the status bar is now taking up the whole screen or something, hiding my actual app behind it. I can see my app in the Xcode console still deploying correctly, its just hidden behind this white screen now:
Interestingly enough though, the status bar is gone…but so is everything else. lol.
What else can I do or look at to fix this?
if (device.platform == "iOS") {
console.log("platform: " +device.platform) ;
ionic.Platform.fullScreen();
if (window.StatusBar) {
return StatusBar.hide();
}
}