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 6:
the image used (with coloured background highlight size).
can me make button correct in ios 5?
edit:
here result if don't use resizableimagewithcapinsets:
.
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
Post a Comment