谷歌iPhone应用状态栏动画他们是怎么做到的?
我正在玩 iPhone 版 Google 应用程序,当我查看网站时,页面标题出现在经典状态栏上,并带有漂亮的淡入动画,4-5 秒后标题视图消失,并带有漂亮的淡出动画。
他们是怎么做到的?他们是否使用 [[UIApplication sharedApplication] setStatusBarHidden:YESanimated:YES] 隐藏状态栏,然后以某种方式在空白处添加动画?根据我的经验,如果不告诉 viewController“想要全屏布局”,就无法填充该空间。
使用“想要全屏布局”的另一个想法是使用 [[UIApplicationsharedApplication]setStatusBarHidden:YESanimated:NO] 隐藏状态栏,并将 UIView 作为子视图添加到控制器的视图中,并对其进行动画处理(淡入/淡出在定期间隔)。
有关如何实现此目标的任何指示?
替代文本 http://img192.imageshack.us/img192/2158/screenshot2010031110355.png< /a> 替代文本 http://img502.imageshack.us/img502/8892/screenshot2010031110360.png< /a>
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须通过调用隐藏 iPhone 的状态栏
并在那里添加您的视图!
You have to hide the iPhone's status bar by calling
and add your view there!