My app runs in a UINavigationController. When I push in a new view controller from the right, the top right UIBarButtonItem (Edit) shifts down by 1 pixel — the Edit button stays in place, but the graphic noticeable shifts down.
I've noticed this only happens after I set up a UIAppearance proxy for the bar button item. This is my code for doing that:
UIImage *barButton = [[UIImage imageNamed:@"navBarBarButton"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 5)];
[[UIBarButtonItem appearance] setBackgroundImage:barButton
forState:UIControlStateNormal
barMetrics:UIBarMetricsDefault];
navBarBarButton.png is a 52x31 bar button image.
Other potentially relevant info:
Has anyone seen this, know why this is happening, or how to prevent the button from shifting? Thanks.
In case anyone gets here with the same issue, I managed to fix the issue by having my barButton image at the standard 30px height (instead of 31, as above).