uiimage - UIBarButtonItem appearance difference between iOS 5 and iOS 6 -


i'm using appearance proxy set background image of button in navigation bar.

[[uibarbuttonitem appearance] setbackbuttonbackgroundimage:[[uiimage imagenamed:@"arrow-back-button"] resizableimagewithcapinsets:uiedgeinsetsmake(0., 9., 0., 0.)]                                                   forstate:uicontrolstatenormal barmetrics:uibarmetricsdefault]; 

this works great ios 6, looks absolutely perfect. in ios 5, however, background image starts repeating, if button taller or something.

ios 5:

ios 5 version

ios 6:

ios 6 version

the image used (with coloured background highlight size).

back button image

can me make button correct in ios 5?

edit:

here result if don't use resizableimagewithcapinsets:.

ios 5 no resizableimage

the tiling behavior experiencing normal ios 5.x. behavior knows how resize image. don't know why seems resize in 5.x not in 6.x, way fix behavior in ios 5.x make png same size background of uibarbuttonitem (with alpha filler) , set non-resizable background image.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -