Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set status bar tint color on iOS 6?

Tags:

As shown on Apple's September 2012 keynote, the status bar tint color varies between apps in iOS 6. For instance, Safari and Maps use a black status bar whereas Mail adds a blue tint to it.

Is it possible to set that tint color, or at least force it to black?

like image 486
Anton Avatar asked Sep 17 '12 22:09

Anton


People also ask

How to change bottom bar color in iOS?

Go to the Storyboard. Select the View and in the Attributes Inspector change the Background Color to Light Gray. Build and Run the Project. The default style of the status bar is dark content.

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.

How to change status bar color swift iOS?

Open your info. plist and set UIViewControllerBasedStatusBarAppearance to false . In the first function in AppDelegate. swift , which contains didFinishLaunchingWithOptions , set the color you want.


2 Answers

You can do it from the plist like Comradsky mention or in xcode 4.5, they added an option for it in the project summary.

enter image description here

Update:

several people were confused by this answer. Just to clarify, you cannot set the status bar tint to any color you want. What is described above is only to change the status bar tint during launch and choose the iOS 6 default status bar color behavior (which picks the color of the bottom row of pixels from your navigation bar).

like image 175
KDaker Avatar answered Sep 20 '22 23:09

KDaker


I've just found how to do it !

  1. In your "Project Summary", in "Status Bar", set "Style" and "Tinting" to "Default.
  2. Then, jump into you xib or storyboard and add a UINavigationBar just below the status bar.
  3. Set the UINavigationBar "Style" to "Default" and select the "Tinting" of your choice.
  4. Run! :-)

If, like me, you don't want any UINavigationBar visible in your Interface, all you want to do is putting the UINavigationBar behind all the Objects, or set the "Alpha" to zero.

like image 22
Geoffroy Avatar answered Sep 22 '22 23:09

Geoffroy