Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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
You can’t perform that action at this time.