How to show status bar initially hidden from plist iphone - iphone

i want to hide the status bar when i launch my app to view launch image that was covered by status bar. so in plist i added
Status bar is initially hidden YES
and status bar is covered.
My problem is that status bar is covered always in my app, i want to hide status bar only for launch image, what can i do?

[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];

SOLVED
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:NO];
using this at launch of app :)

you can do this by adding property, "Status bar Initially Hidden" to plist as shown below : -

OR
you can also set the (Status bar Initially Hidden)Property to "NO" in Info.plist file in your Application.
Just uncheck this property.

Neither Niko's nor JackTurky's solutions are correct. Niko's:
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
...works but is deprecated. Correct in iOS 3.2 and later is:
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];

Related

how to hide the title bar(top bar) in iphone from a view [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Hide the status bar on iPhone on a single view?
I want to hide the title bar in iphone from my first welcome view and also from the splash screen, how can i hide it(top bar, not the navigation bar).
I saw a post with this
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
but this hides the title bar through out the application. I just want to hide it from the first view.
The easiest way to hide the status bar is to go into youInfo.plist; right click to add a row and select Status Bar Initially hidden.
This will ensure every time you app launches the status bar will be hidden.
Edit
with programming
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
self.navigationController.navigationBar.frame = CGRectMake(0, 0, 320, 44);
and when you want to show the statusbar just use bellow code..
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
self.navigationController.navigationBar.frame = CGRectMake(0, 45, 320, 44);
i hope this help you...
:)
In AppDelegate class applicationDidFinishLaunching ,write the below code
- (void) applicationDidFinishLaunching:(UIApplication *)application
{
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
}
All other views (except first View) when you need to display StatusBar, write the below code in curresponding ViewDidiLoad() / viewWillAppear,
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
in your info.pist find this option.
"Status bar is initially hidden" And set as YES.
Depends which version of Xcode you are using.
In 4.5 you can go into the build settings "Summary" tab and set this in the "Status Bar" section.
If you don't have 4.5 then in the build settings "Info" section add a plist entry for "Status Bar Is Initially Hidden" and set it to YES. (Alternatively, download Xcode 4.5 because you should do this anyway).

How I can remove the Play-Button in statusbar

is it possible to remove the play button in the statusbar if I play an soundfile but the app is in backgroundmode and I see the springboard.
http://i.stack.imgur.com/qsxLl.png
regards Alex
we can not change the icon of the status bar . but we can hidden the status bar of the Application
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:NO];
try running the audio in ambient mode.

Iphone programming: remove bar

I'm not sure what it is called, but there is a bar at the top of the iphone screen with the time and battery. What is the simplest way to remove it?
In your Info.plist file, set UIStatusBarHidden to true. Also, you might have to add this in your app delegate:
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
As a reminder, you might have to change the height in your NIB file since the bar is hidden. It might not change it automatically.
Go to your applicationDidFinishLaunching: in you app delegate and write this code..
[[UIApplication sharedApplication] setStatusBarHidden:YES];

iPhone SDK - how to hide and show the status bar together with the MPMoviePlayerController controls?

I'm using a MPMoviePlayerViewController to show a movie. I have set the MPMoviePlayerController to fullscreen. Now I want to hide the status bar as soon as the fullscreen controls start to fade out and show the status bar if the controls are visible.
If I'm using a UIWebView all this happens automatically. The status bar fades in and out together with the controls. How would you do that with a MPMoviePlayerController?
Thanks for any help.
You can use to hide status bar
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES];
and to show status bar
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:YES];
This will happen automagically for you once you use the MPMoviePlayerController property controlStyle and set to MPMovieControlStyleFullscreen.
player.controlStyle = MPMovieControlStyleFullscreen;
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES];
The animated bit is now deprecated so just use:
[[UIApplication sharedApplication] setStatusBarHidden:YES];

Hiding status bar completely

I hide the status bar in applicationDidFinishLaunching using
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
That works fine except the status bar is there while the app is loading. Meaning, when the default.png is displayed, I see the status bar. Is there a way to have the status bar not show at all?
Add UIStatusBarHidden to your info.plist file, set to true. Documentation here:
http://developer.apple.com/library/ios/ipad/#documentation/general/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html
You need to use this:
[[UIApplication sharedApplication] setStatusBarHidden:YES];
and then open up the info.plist file, create a new line, chose Status bar is initial hidden and set it to true.
You need to edit your Info.plist to include the entry "Status bar is initially hidden" and set the value to YES.
For more information:
http://www.idev101.com/code/User_Interface/StatusBar.html