I am using UIAppearance
to set a custom backButtonBackgroundImage
as well as hide the back button title:
// Back Button Image
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:[UIImage imageNamed:@"ZSSBackArrow"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -100) forBarMetrics:UIBarMetricsDefault];
This works really well, but the problem is that my arrow image get really stretched horizontally:
It should look like this:
Update: Using cap inset makes the image look like this:
Is there a way to prevent the image from being stretched?