appcelerator ios app displays black bar above and below app content

441 Views Asked by At

This is driving me completely crazy. I can not get my app to hide the status bar on my iphone.

In my tiapp.xml I have

<fullscreen>true</fullscreen>
and
<key>UIStatusBarHidden</key><true/>

in my index.xml I have

<Alloy>
<Window class="container" fullscreen="true">

I still get a blank statusbar at the bottom of the screen on my iphone.

What do I miss ? This is frustrating.

3

There are 3 best solutions below

0
On BEST ANSWER

What you saw in http://s11.postimg.org/3rk17bib7/bottompart.png is not very clear because the app had a black background, but this is what was happening:

You were missing splash screens for the iPhone (6) you ran the app on, which triggers iOS to display the app in letterbox mode. So the black space under the label is the letterbox. Same will have been visible at the top of the screen.

1
On

Finally found the problem. It's pretty strange but it has to do with the images in app/assets/iphone. I previously deleted all the Alloy default images (all the ones starting with "Default"). I put the Alloy default images back and the problem disappeared.

Not sure I understand why but this fixed it.

3
On

You need to do some changes in code,

In Tiapp.xml

<fullscreen>false</fullscreen>
<navbar-hidden>true</navbar-hidden>

In index.xml

<Window class="container">
    <Label id="label" onClick="doClick">Hello, World</Label>
</Window>

In index.tss

".container": {
   layout: "vertical",
   navBarHidden: true,
   backgroundColor:"white"
}

http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Window-property-navBarHidden

This make navbar hidden in ios.