If you don't want your (lightweight) view to be positioned under the status bar, you can set top to 20. This will cause the main view's background color (set via Ti.UI.backgroundColor or image to be visible under the status bar.
This works fine as long as the background color/image is light, because the status bar text is always black. On a dark (black) background, the only thing you will see is the green battery icon.
To fix this, all we need is the new UIStatusBarStyleLightContent style to be exposed as an option for Ti.UI.iPhone.statusBarStyle. For example as Ti.UI.iPhone.StatusBar.LIGHT_CONTENT.
- Create app: titanium create -p ios --id test.statusbar -n TestStatusBar
- Use as app.js:
- Run the app to see you can only see the green battery icon (as attached).
- Change the first line to:
- Run the app to see the text was actually there but not visible black on black.