I have an Navigation bar and I want to change its left item default color to White.
I WANT THE BLUE TO BE WHITE
I want to done this programmatically. Currently i am using this code to change the color and title of navigation bar
- (void)viewWillAppear:(BOOL)animated
{
[self.navigationController setNavigationBarHidden:NO];
self.navigationItem.title = @"Advanced Settings";
UIColor *bg = [UIColor colorWithRed:79/255.0f green:166/255.0f blue:196/255.0f alpha:1.0f];
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) {
// iOS 6.1 or earlier
self.navigationController.navigationBar.tintColor = bg;
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor whiteColor]};
} else {
// iOS 7.0 or later
self.navigationController.navigationBar.barTintColor = bg;
self.navigationController.navigationBar.translucent = NO;
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor whiteColor]};
}
}