I have an issue in iOS7 where a normal UINavigationController pushed view controller has the correct status bar text color for the UINavigationController navbar color (which is
You can redefine the preferredStatusBarStyle method in your navigation controller class
- (UIStatusBarStyle)preferredStatusBarStyle
{
return UIStatusBarStyleLightContent;
// or UIStatusBarStyleBlackOpaque, UIStatusBarStyleBlackTranslucent, or UIStatusBarStyleDefault
}
and you can also define a "view did load method" to set custom colors you want
- (void) viewDidLoad
{
UIColor *barColor = [UIColor whitecolor];
UIView *colorView = [[UIView alloc] initWithFrame:CGRectMake(0.f, -20.f, 320.f, 64.f)];
colorView.opaque = NO;
colorView.alpha = .5f;
colorView.backgroundColor = barColor;
self.navigationBar.barTintColor = barColor;
self.navigationBar.tintColor = [UIColor whiteColor];
[self.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
/*self.navigationController.navigationBar.barTintColor = [UIColor blackColor];
self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
[self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];
self.navigationController.navigationBar.translucent = NO;*/
[self.navigationBar.layer insertSublayer:colorView.layer atIndex:0];
}