开发者

Animated status bar style transition, a la iPod app

开发者 https://www.devze.com 2022-12-26 02:46 出处:网络
In the iPod app, the navigation views have the default status bar style, and the Now Playing view is in the black style. The transition between them is animated with a crossfade. I want to do that.

In the iPod app, the navigation views have the default status bar style, and the Now Playing view is in the black style. The transition between them is animated with a crossfade. I want to do that.

My first attempt:

[UIView beginAnimati开发者_如何学Pythonons:@"whatever" context:nil];
[UIView setAnimationDuration:0.5];
self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlack
[UIView commitAnimations];

No joy, it pops to black. Takers?


Try this instead:

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque animated:YES];
0

精彩评论

暂无评论...
验证码 换一张
取 消