Dealing With Status Bar Post iOS7

Good guide here

Setting Status bar text white

Set the UIViewControllerBasedStatusBarAppearance to YES in the .plist file.

In the viewDidLoad do a [self setNeedsStatusBarAppearanceUpdate];

Add the following method:


-(UIStatusBarStyle)preferredStatusBarStyle{ 

    return UIStatusBarStyleLightContent; 

}

Status Bar Size

20 pixels

Interface Builder Status Bar Setting

The "Simulated Metrics" don't actually alter the status bar etc, it just simulates the size and colour of the status bar so that you can layout your views without having to shift everything down by 20 pixels.

Set Status Bar To Black

In

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

use

    [application  setStatusBarStyle:UIStatusBarStyleBlackOpaque];

Removing Status Bar in iOS 7

iOS 7 supports the Status Bar being hidden for some views but not others. To hide it for all views, do the following:

Make sure Hide during application launch is still checked, to support previous OS versions.

In your Info.plist file, add "View controller-based status bar appearance" and set it to NO.

You may need to "Clean" before building,

Removing The Status Bar

In the Supporting Files folder open yourapp-Info.plist.

Right click > Add Row

Key: Status bar is initially hidden (UIStatusBarHidden)

Value: NO

Or if you want to remove it programatically (but it will be shown with the launch image if you don't use UIStatusBarHidden):

In

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

use

    [application  setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];

 

The interface builder by default creates 460*320 view. Change it to 480*320 and align the views.

Forcing View Below Status Bar

    [self view].frame = CGRectMake(0, 20, 320, 460);