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];
Related
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).
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.
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];
i just finished my first view in my iPhone app and i want to add a second view to wich the user go when he click in the button in the first view. So i add new view from the librairy window, but i don't see the battery in the top, is that normal ? and how to add it please ??
Assuming you mean the status bar along the top you can try this code to make sure it is shown:
[[UIApplication sharedApplication] setStatusBarHidden:NO];
or:
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:YES];
if you want to animate it coming down.
Cheers.
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