I've been looking around and it seems like the answer is no, but the posts are dated so I was wondering if this has changed. Is it possible to set the status bar to translucent? I'm trying to do a fade-in/fade-out effect on a multitouch tap but the status bar keeps coming up as solid black.
Thanks!
-- edit -- The code I'm using for the event transition is below. I have set the statusbar to translucent in the -info.plist, but I noticed there's no Black Translucent setting in IB (which is probably my answer: no translucent statusbar unless you're Apple.)
-(IBAction)showOptions:(id)sender
{
if ([UIApplication sharedApplication].statusBarHidden == YES) {
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
[UIView beginAnimations:@"fadeIn" context:nil];
[UIView setAnimationDuration:0.25];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
optionsView_portrait.alpha = 0.5;
[UIView commitAnimations];
}
else
{
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];
[UIView beginAnimations:@"fadeOut" context:nil];
[UIView setAnimationDuration:0.25];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
optionsView_portrait.alpha = 0.0;
[UIView commitAnimations];
}
}
A status bar appears along the upper edge of the screen and displays information about the device's current state, like the time, cellular carrier, and battery level.
The icons in the status bar at the top of the screen provide information about iPad. Note: If you turn on a Focus, its icon appears in the status bar.
Set the status bar style of UIApplication
:
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent
animated:YES];
The view of the view controller where the status bar is translucent should also occupy the entire screen dimensions of 320 by 480 points. This way, the view underlaps the status bar and anything in the top 20 pixels will be semi-visible under the status bar.
If there isn't any part of your view occupying the top 20 pixels it will show up as black underneath.
EDIT: If you are working with the iPad, as Steven Fisher points out the iPad does not support having a translucent black status bar. It's always solid black.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With