iOS 7 UIBarButton back button arrow color
Solution 1:
To change the back button chevron color for a specific navigation controller*:
self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
*If you are using an app with more than 1 navigation controller, and you want this chevron color to apply to each, you may want to use the appearance proxy to set the back button chevron for every navigation controller, as follows:
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
And for good measure, in swift (thanks to Jay Mayu in the comments):
UINavigationBar.appearance().tintColor = UIColor.whiteColor()
Solution 2:
You have to set the tintColor of the entire app.
self.window.tintColor = [UIColor redColor];
Or in Swift 3:
self.window?.tintColor = UIColor.blue
Source: iOS 7 UI Transition Guide
Solution 3:
You can set the color on the entire app navigation's bar using the method
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:
(NSDictionary *)launchOptions{
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
}
Solution 4:
It is possible to change only arrow's color (not back button title's color) on this way:
[[self.navigationController.navigationBar.subviews lastObject] setTintColor:[UIColor blackColor]];
Navigation bar contains subview of _UINavigationBarBackIndicatorView type (last item in subviews array) which represents arrow.
Result is navigation bar with different colors of back button arrow and back button title