How I can remove the Play-Button in statusbar - iphone

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.

Related

Navigation bar is not shown properly when get back from Movie Player in iphone SDK

In my app, I load a HTML Page in Web View which contains a video. Till this the navigation bar is shown properly.
But when i play video with by default Movie Player in iphone & try to see it in Both Landscape/Portrait mode with Full Screen. When get Back from Movie Player, the Navigation Bar is go to upside & status Bar is Cover some view.
I am not taken mediaPlayer framework or any other class in my project.
How can i solved This issue??
Just paste this below line in to the viewWillAppear: on that view controller class where this issue occurs.
Objective C
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
Swift
UIApplication.shared.setStatusBarHidden(false, with:UIStatusBarAnimation.none)
In your Movie player class replace
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
with
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
Means if you hide your status bar when came back from player then the height of the view will increased by 20 pixels.
So your view will go upside

How to show status bar initially hidden from plist 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];

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];

Hide status bar while playing video for iphone

I am trying to hide status bar for iphone application development.But when i am playing video at that that status bar come and after that when i come back to previous screen status bar showing . If i am not playing any video than whole application the status bar hiding.
Can you please help me to hide status bar on video screen ,even i tried for "[[UIApplication sharedApplication] setStatusBarHidden:YES];" before playing video .but this is not working.
"
Thanks,
KamalBhr
[[UIApplication sharedApplication] setStatusBarHidden:YES];//iOS3
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade]; //iOS4
is basically the way to go, but the important part is where respectively when to call it.
that depends a bit if you're developing for iOS4 or iPhone OS 3.0.
in iOS 3 is used to hide the status bar when the Notification MPMoviePlayerContentPreloadDidFinishNotification was fired.
in iOS4 i didn't have any problems hiding the bar before i set the ContentURL of my MPMoviePlayerViewController's moviePlayer property.
i hope i could help.
sam