tags:

views:

55

answers:

1

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 beginAnimations:@"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?

+1  A: 

Try this instead:

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque animated:YES];
glorifiedHacker
Thanks! That works.
Ben Williamson
Note that the above does not need to be nested in your animation block.
glorifiedHacker