Fade out statusbar and navbar
Hi, I want to duplicate the effect in the iPhone photogallery where the statusbar and navbar fades out after a few second.
So far I've only found a way to completely hide or show them.
How can I access them for animation ?
thanks
6 Answers
-
You cannot at present access either the navbar or the status bar directly, so it is not presently possible to manipulate the opacity of either.
You can, however, fade out the status bar as follows:
Ti.UI.iPhone.hideStatusBar({animationStyle:Ti.UI.iPhone.StatusBar.ANIMATION_STYLE_FADE});
There is at present no equivalent for the navbar.
You might be able to construct a somewhat inelegant workaround by replacing the navbar with an image or a toolbar of your own making which you can then manipulate at will.
That might be feasible for a window which simply shows an image but is unlikely to be feasible for anything resembling a navigation group with sub-windows.
-
There's a property delay iirc you can apply to an animation.
-
Yes, but how do I access the navbar and statusbar for animation ?
Since I don't just want to showHide the navbar/statusbar, I want to lower the opacity. -
yeah, how do you do it?
-
Has anyone came up with any solution for this topic?
-
Do this:
setTimeout(function() { Titanium.UI.iPhone.hideStatusBar(); }, 1000);
1000 is milliseconds.. Change to whatever time you want to hide it. And to show it back, use: showStatusBar();
This only works on iPhone.