Skip to content

Instantly share code, notes, and snippets.

@jonalter
Created November 3, 2011 05:55
Show Gist options
  • Select an option

  • Save jonalter/1335867 to your computer and use it in GitHub Desktop.

Select an option

Save jonalter/1335867 to your computer and use it in GitHub Desktop.
iOS: hide/show statusBar
// by Alan Leard
var win = Ti.UI.createWindow({ backgroundColor: '#000' });
var hide = false;
win.addEventListener('click', function(){
if(hide){
Titanium.UI.iPhone.showStatusBar({animated:true, animationStyle:
Titanium.UI.iPhone.StatusBar.ANIMATION_STYLE_FADE});
hide = false;
} else {
Titanium.UI.iPhone.hideStatusBar({animated:true, animationStyle:
Titanium.UI.iPhone.StatusBar.ANIMATION_STYLE_FADE});
hide = true;
}
});
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment