1
votes

I have an app with a navigation controller and 2 child controllers. In my first controller I need to hide the navigation var. But in my second controller I need to show the navigation bar back. In this case, the status bar is always getting the same color as Navigation bar. While the Navigation bar is set to red, I need the status bar to be black with white text.

I have tried setting the status bar color in ViewWillAppear to Black and also tried calling setNeedsStatusBarAppearanceUpdate but the status bar color still remains the same as navigation bar.

Any help will be greatly appreciated. Thanks in advance !

1
Forgot to add, this is required for iOS v8Novice

1 Answers

1
votes

UINavigationBar.appearance().backgroundColor = UIColor.green