Status bars display a collection of status items that provide interaction with or feedback to the user, such as a menu or an image reflecting an application’s state. A system-wide status bar resides at the right side of the menu bar and is the only status bar currently available.
Questions tagged [uistatusbar]
449 questions
1085
votes
60 answers
How to change Status Bar text color in iOS
My application has a dark background, but in iOS 7 the status bar became transparent. So I can't see anything there, only the green battery indicator in the corner. How can I change the status bar text color to white like it is on the home screen?

Oleksandr Veremchuk
- 10,975
- 3
- 14
- 9
281
votes
25 answers
preferredStatusBarStyle isn't called
I followed this thread to override -preferredStatusBarStyle, but it isn't called.
Are there any options that I can change to enable it? (I'm using XIBs in my project.)

trgoofi
- 3,091
- 3
- 16
- 11
219
votes
27 answers
iOS 7: UITableView shows under status bar
The first screen of my application is a UITableViewController without a navigation bar, which means that the content flows under the status bar so there's a lot of text collisions. I've adjusted both the properties for Under top bars and Adjust…

Nicholas Smith
- 11,642
- 6
- 37
- 55
203
votes
33 answers
How to set Status Bar Style in Swift 3
I'm using Xcode 8.0 beta 4.
In previous version, UIViewController have method to set the status bar style
public func preferredStatusBarStyle() -> UIStatusBarStyle
However, I found it changed to a "Get ONLY varaiable" in Swift 3.
public var…

Willjay
- 6,381
- 4
- 33
- 58
111
votes
19 answers
UIStatusBarStyle PreferredStatusBarStyle does not work on iOS 7
In my iPhone application built with Xcode 5 for iOS 7 I set UIViewControllerBasedStatusBarAppearance=YES in info.plist, and in my ViewController I have this code:
-(UIStatusBarStyle) preferredStatusBarStyle
{
return…

Andrew Smith
- 2,919
- 2
- 22
- 25
100
votes
10 answers
How to prevent UINavigationBar from covering top of view in iOS 7?
After updating to Xcode 5, the navigation bars in all of my app's views have shifted down. Here are some screenshots, the first showing everything in the view as it's pulled down, and the second showing all of it untouched. The search bar should…

Sam D20
- 2,535
- 5
- 25
- 43
99
votes
6 answers
Changing the status bar text color in splash screen iOS 7
I know that are already some stackoverflow questions that say how to change the status bar for all view controllers. I am currently changing the color of status bar this way:
if(IS_IOS7)
[[UIApplication sharedApplication]…

Tiago Almeida
- 14,081
- 3
- 67
- 82
87
votes
11 answers
UIStatusBarStyle not working in Swift
I'm trying to change the Status Bar color in my Swift app to white, but am hitting a brick wall. I have 3 ViewControllers that are each embedded in a NavigationController (could that be the issue? I've already tried to place the code in the…

davidrayowens
- 1,562
- 2
- 13
- 23
64
votes
16 answers
Change Status Bar Background Color in Swift 3
In XCode 7.3.x ill changed the background Color for my StatusBar with:
func setStatusBarBackgroundColor(color: UIColor) {
guard let statusBar = UIApplication.sharedApplication().valueForKey("statusBarWindow")?.valueForKey("statusBar") as? UIView…

derdida
- 14,784
- 16
- 90
- 139
48
votes
14 answers
UINavigationBar/Status Bar issue in IOS7
Final EDIT
(Rather than having an overly long question with edits making a final edit for clarification, please see other edits if needed).
Controller Setup
I have an application that is setup as follows:
InitialViewController (subclass of…

StuartM
- 6,743
- 18
- 84
- 160
45
votes
14 answers
Status Bar showing black text, only on iPhone 6 iOS 8 simulator
I'm trying to convert my iOS 7 app to iOS 8 in Xcode 6 GM, and when i run it on the iPhone 5s or lower simulators with iOS 8 everything is fine, but on the iPhone 6 and 6 Plus simulators, the Status Bar has black text instead of white like it is…

Mohamed Hafez
- 8,621
- 7
- 41
- 49
44
votes
5 answers
IOS7 Status bar hide/show on select controllers
I would like to show and hide the Status bar on some controllers. Can this be done or is it more of an overall app setting.
I have seen many posts/questions about the plist update:
View controller-based status bar appearance - NO
If this is…

StuartM
- 6,743
- 18
- 84
- 160
38
votes
5 answers
Loading Indicator in Status Bar iOS
I'm trying to figure out what the loading circle animation in the status bar is. A lot of apps, when they load data, have a spinner in the status bar to indicate that the app is loading data, but I can't figure out what its called to implement it.…

RileyE
- 10,874
- 13
- 63
- 106
33
votes
5 answers
When hiding the statusbar my navigation bar moves up in iOS7
I am trying to hide the statusbar but maintain the "bigger" navigationbar height. Right now when I hide the statusbar by setting - (BOOL)prefersStatusBarHidden to YES and then calling [self setNeedsStatusBarAppearanceUpdate];. The problem with this…

Tim Wachter
- 732
- 5
- 22
33
votes
7 answers
Proper way to hide status bar on iOS, with animation and resizing root view
Consider a view controller that needs to slide out (or hide) the status bar when a button is clicked.
- (void) buttonClick:(id)sender
{
[[UIApplication sharedApplication] setStatusBarHidden:YES
…

hpique
- 119,096
- 131
- 338
- 476