简体   繁体   中英

Google iPhone app status bar animation how did they do it?

I was playing with the Google App for iPhone and when i viewed a website the title of the page appeared over the classic status bar with a nice fade-in animation, after 4-5 seconds the title view disappeared with a nice fade-out animation.

How did they do that? did they hide the status bar with [[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES] and then added somehow the animation in the empty space? from my experience you can't fill that space without telling a viewController to "want fullscreen layout".

Another idea using "wants fullscreen layout" is to hide the status bar with [[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO] and add an UIView as a subview to the controller's view and animate that(fade-in/fade-out at regular intervals).

Any pointers on how can i achieve this?

alt text http://img192.imageshack.us/img192/2158/screenshot2010031110355.png alt text http://img502.imageshack.us/img502/8892/screenshot2010031110360.png

You have to hide the iPhone's status bar by calling

[UIApplication sharedApplication].statusBarHidden = YES;

and add your view there!

You can add another window on top of the UIStatusBar. The question below has some nice sample code and even a library that may do what you want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM