Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom back indicator image in iOS 7 not vertically centered

I am using the following code to use a custom image for the back indicator in my iOS 7 app:

UIImage *temp = [[UIImage imageNamed:@"back-black-on-black-normal-2"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
[[UINavigationBar appearance] setBackIndicatorImage:temp];
[[UINavigationBar appearance] setBackIndicatorTransitionMaskImage:temp];

The strange thing is, if I use an image that is 22px high (way too small for what we want, by the way), it centers vertically within in the nav bar just fine. Once I start to make it a more reasonable size, however, it gets way off vertically (here it's 44px high, still too small for us but not centering at all, as you can see):

enter image description here

Any help or suggestions greatly appreciated. Thanks.

like image 547
fogwolf Avatar asked Feb 10 '14 18:02

fogwolf


1 Answers

enter image description here

Check button image, is there any unwanted bottom space?

like image 192
Shebin Koshy Avatar answered Nov 12 '22 07:11

Shebin Koshy