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
Parametershidden
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.
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
Related Topics
@Import "Unexpected '@' in Program"
"'Cdvplugin.H' File Not Found" in Cordova as Component (Cleaver)
Border Around Uitableview Section
What Exactly Are Protocols and Delegates and How Are They Used in iOS
How to Wake Up iOS App with Bluetooth Signal (Ble)
Swift 3 Objc Optional Protocol Method Not Called in Subclass
How to Use Swift Repl with iOS Sdk
Removing Badge from iOS App Icon
Xcode 7.1 Swift 2 Unknown Class in Interface Builder File
iOS 4.3 Hide Status Bar Permanently
Xcode Crash Organizer Does Not Symbolicate .Xccrashpoint Files
How to Reference Uitableviewcontroller from a Uitableviewcell Class
Installation Failed "Invalid Argument" When Trying to Run Today Application Extension