Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@lexrus
Created October 10, 2013 08:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lexrus/6914810 to your computer and use it in GitHub Desktop.
Save lexrus/6914810 to your computer and use it in GitHub Desktop.
// Fixed iOS 7 backButtonBackground issue.
// http://stackoverflow.com/questions/18617522/back-button-is-not-visible-in-ios-7/18950658#18950658
if ([[UIDevice currentDevice].systemVersion compare:@"7.0" options:NSNumericSearch] != NSOrderedAscending) {
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[[UINavigationBar appearance] setBackIndicatorImage:[UIImage imageNamed:@"BackButtonIcon"]];
} else {
UIImage *backButtonBackground = [[UIImage imageNamed:@"BackButtonIcon"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 29, 0, 0)];
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:backButtonBackground forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment