Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a black status bar on an iPhone app?

Tags:

I want to use a black status bar for my iPhone app. I have selected black status bar on all of my .xibs but I still can't get it to be black. Is this an issue that anyone else has seen or knows how to remedy?

like image 917
Jackelope11 Avatar asked Jul 22 '11 15:07

Jackelope11


People also ask

Can you customize iPhone status bar?

Tap the plus icon in the top right corner. Tap Custom. Choose a name for your Focus and an icon. Add people that you want to allow notifications for messages and calls.

How can I change status bar background color?

Step 1: After opening the android studio and creating a new project with an empty activity. Step 2: Navigate to res/values/colors. xml, and add a color that you want to change for the status bar. Step 3: In your MainActivity, add this code in your onCreate method.


2 Answers

  1. Open the "info.plist" file .
  2. Add a new row.
  3. Select "Status bar style" as the key.
  4. Select "Opaque black style" as the value.

EDIT: The comment by @codrut below to choose the value:
If you go far to the right, there's a button that brings you a drop down with the possible options.

like image 149
EmptyStack Avatar answered Sep 25 '22 19:09

EmptyStack


The status bar in the nib files is there as an indication, just to simulate the real interface. What you need to do is:

 [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleBlackOpaque]; 

and in the plist change the Status Bar Style (UIStatusBarStyle) to Black opaque (UIStatusBarStyleBlackOpaque) (or whatever you want).

like image 25
Remy Vanherweghem Avatar answered Sep 22 '22 19:09

Remy Vanherweghem