1

I having two views, one needs to be shown when the app is in portrait mode and another one in landscape mode.

View which should be shown when the device is in portrait mode is in black color, so I want to change the status bar text color to white. This is working perfectly by setting the code given below:

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

When the device is in landscape mode I need to display a view with white background and change the status bar text color to black. The issue is that the text color of status bar is not changing to black color. I have used the code given below:

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];

I have also set the value of View controller-based status bar appearance to NO in plist.

I have tried the solution given in a similar question, but it is also not working. Check the link:

Change iOS7 Status Bar Colour programmatically, mid-run?

UPDATE:

I Found that this issue is only in iOS 8. I have checked with an iPad having iOS 7 and found that it is working well.

Community
  • 1
  • 1
roy mathew
  • 7,782
  • 4
  • 29
  • 40

0 Answers0