SwiftMatt
SwiftMatt

Reputation: 1029

iOS 9 Navigation Bar Under Status Bar

enter image description here

How do you prevent the navigation bar from going under the status bar, and respect the status bar's space?

Upvotes: 2

Views: 2241

Answers (3)

ImWH
ImWH

Reputation: 944

In the viewController you want to hide the satusBar:

- (BOOL)prefersStatusBarHidden {
return YES;
}

Upvotes: 1

Muneeba
Muneeba

Reputation: 1776

If your app uses a UINavigationController with every view,when a UINavigationController is present, the UINavigationBar will automatically be placed below the status bar (the standard 20 point offset from the top of the screen that we are accustomed to from previous iOS versions).

Check this link for details

If you don't want the status bar hide it.

Upvotes: 1

Shubham Chawla
Shubham Chawla

Reputation: 132

[[UIApplication sharedApplication] setStatusBarHidden:YES];

Upvotes: 1

Related Questions