This feature seems to be a bit buggy in iOS 7.1. The setting that most affects the look is actually barTintColor on your UINavigationBar .
Some examples:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[UINavigationBar appearance] setBarTintColor:[UIColor lightGrayColor]]; return YES; }
When I first start, the back button looks fine:

Then when I go to the landscape, it looks too dark:

And then it stays too dark when I return to the portrait:

The same thing happens when I use [UIColor orangeColor] as barTintColor . Everything is fine at first:

In the landscape, he messed up:

And then he remains like this:

Thus, this clearly looks like a bug in iOS 7.1. One thing you can do is set the background image for the back button. This background will then display whether the Button Shapes button is activated or not. Example:
UIImage *backButtonImage = [[UIImage imageNamed:@"back_button.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0.0f, 17.0f, 0.0f, 1.0f) resizingMode:UIImageResizingModeStretch]; [[UIBarButtonItem appearance] setBackButtonBackgroundImage:backButtonImage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; [[UIBarButtonItem appearance] setBackButtonBackgroundImage:backButtonImage forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault]; [[UIBarButtonItem appearance] setBackButtonBackgroundImage:backButtonImage forState:UIControlStateNormal barMetrics:UIBarMetricsLandscapePhone]; [[UIBarButtonItem appearance] setBackButtonBackgroundImage:backButtonImage forState:UIControlStateHighlighted barMetrics:UIBarMetricsLandscapePhone];
So the big question is: can we set the background image of the button when the "Button Shapes" is turned on in a way that is independent of barTintColor ?
Johannes Fahrenkrug
source share