谷歌iPhone应用状态栏动画他们是怎么做到的?

发布于 2024-08-25 05:51:58 字数 821 浏览 6 评论 0原文

我正在玩 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

皇甫轩 2024-09-01 05:51:58

您必须通过调用隐藏 iPhone 的状态栏

[UIApplication sharedApplication].statusBarHidden = YES;

并在那里添加您的视图!

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

[UIApplication sharedApplication].statusBarHidden = YES;

and add your view there!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文