6

In iOS 7, statusbar should be transparent by default. I am making an app which is using tabs. One tab is showing a simple UIView. I want white statusbar so i just put my view background white and it worked fine. Second tab' view is embedded in Navigational Controller. I set second view's background as white as well. But my statusbar becomes black. And i can't see anything except battery sign. Looks like following images:

Simple view statusbar: enter image description here

View Embedded in Navigational Controller statusbar: enter image description here

I want white statusbar in my whole app. Any idea why is it happening and how can i fix that. Thanks in advance.

Piscean
  • 3,069
  • 12
  • 47
  • 96
  • This thread should help you. http://stackoverflow.com/questions/17678881/how-to-change-status-bar-text-color-in-ios-7 – Sahil Sep 25 '13 at 12:00

2 Answers2

1

In the app delegate try:

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

    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

Are any of your VC's modal, as above seems ineffective on modal VC's.

Aardvark
  • 608
  • 5
  • 15
0

Have you made whole app using Xcode 5 ??

I m getting same problem if i am running app from Xcode 4 to Device with ios 7. If I m making app from Xcode 5 and running in device with iOS 7. It is not giving any such problem

Mehul Thakkar
  • 12,440
  • 10
  • 52
  • 81
  • Its made with Xcode 5 and i am installing it on iPhone with iOS 7. Problem is with only those views which are embedded in navigation controller – Piscean Sep 23 '13 at 14:46
  • I Reinstalled latest version of Xcode and now i can't even see battery first time i open view embedded in navigation controller. But when i go to a view which is not embedded in navigation controller and then come back then i see normal statusbar with black background. – Piscean Sep 23 '13 at 17:47