iOS 4.3 Hide Status Bar Permanently

IOS 4.3 hide status bar permanently

Try this:

[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];

From Apple Class Reference:

setStatusBarHidden:withAnimation:

Hides or shows the status bar,
optionally animating the transition.
- (void)setStatusBarHidden:(BOOL)hidden
withAnimation:(UIStatusBarAnimation)animation
Parameters

hidden
YES to hide the status bar, NO to show the status bar.

animation
A constant that indicates whether there should be an animation and, if
one is requested, whether it should
fade the status bar in or out or
whether it should slide the status bar
in or out.

Hide ios status bar when View controller-based status bar appearance=YES

First, declare a variable to indicate hidden or not:

@interface ExampleViewController
{
BOOL statusBarHidden;
}

Second, override UIViewController's method which depends the variable:

- (BOOL)prefersStatusBarHidden {
return statusBarHidden;
}

Finally, when you need to hide status bar, do:

statusBarHidden = YES;
[self setNeedsStatusBarAppearanceUpdate];

When you need to display status bar again, do:

statusBarHidden = NO;
[self setNeedsStatusBarAppearanceUpdate];

Want to hide status bar just in launchscreen in iOS?

you can simply check Hide status bar in your target's general settings. This should hide your status bar on the launch screen but show it on the initial viewcontroller.

how to hide the iphone top bar?

In your Project Info.plist file set Status bar is initially hidden YES, This will hide status bar for complete project.

Sample Image

And if you want to hide status bar in particular view the

[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:<#(UIStatusBarAnimation)#>];

How to show status bar initially hidden from plist iphone

SOLVED

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

using this at launch of app :)

Status Bar Still Showing

Please try this

//viewDidload
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
// iOS 7
[self prefersStatusBarHidden];
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
} else {
// iOS 6
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
}

// Add this Method
- (BOOL)prefersStatusBarHidden
{
return YES;
}

This code has been taken from this link

How do you hide the status bar in cocoa touch?

try:

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

Status bar won't disappear

Try adding the following method to your app's root view controller:

- (BOOL)prefersStatusBarHidden
{
return YES;
}

IOS 7 Status bar keeps appearing

You need implement 2 steps for to hide status bar accross your app:

1) didFinishLaunchingWithOptions

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.

[[UIApplication sharedApplication]setStatusBarHidden:YES];

.......

}

2) And .plist file of your project
Set this parameter in .plist file



Related Topics



Leave a reply



Submit