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

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -