I am struggling with an ios7 / objective-c issue that hopefully someone will be able to help me with.
As some background, I have an app that is rendering as expected on io6 devices, but I trying to bring it into compliance with ios7.
Where things have gotten confusing is the fact that my code is working as expected on the iPhone but it is not on the iPad.
From the images below you will see that the status bar (carrier, time, battery) renders as expected on the iPhone but not the iPad:
(note: due to this being my first posting, I can't directly embed the images, sorry about that).
From the coding point of view, I have tried all the suggestions indicated at: How to change Status Bar text color in iOS 7 without any luck.
What I do have that makes the App render as expected is the following definition in my AppDeligate.
// News page
newsViewController = [[NewsViewController alloc] init];
newsNavigationController = [[UINavigationController alloc] initWithRootViewController:newsViewController];
newsNavigationController.navigationBar.translucent = NO;
newsNavigationController.navigationBar.barStyle = UIStatusBarStyleLightContent;
newsNavigationController.navigationBar.tag = 4013;
Now I think that issue is that even though I have set the bar style to UIStatusBarStyleLightContent
, which should put the text in white, it is not doing this on the iPad. Instead it renders as black on black.
This seems to be the case, because if I remove the line:
newsNavigationController.navigationBar.translucent = NO;
the black changes to a dark gray, and the carrier, date, battery, can be seen BUT in the black. I am willing to live with the dark gray vs the black background, but the status bar items will need to render in white like the iphone.
Any suggestions?
P.S. I am not sure if this will help point things in the right direction, but the iPad is using a splitview controller.
Thanks