I used this code to customize my barbutton for iOS 5 and it worked properly:
UIImage *barButton = [[UIImage imageNamed:@"bar-button"] resizableImageWithCapInsets:UIEdgeInsetsMake(5, 5, 5, 5)];
[[UIBarButtonItem appearance] setBackgroundImage:barButton forState:UIControlStateNormal
barMetrics:UIBarMetricsDefault];
When I rotate the device to landscape on iOS 5 the result is this:

Now with iOs 6 the result is this:

What happened and what I have to do to properly resize the image when the device is in landscape?
You should provide a landscape image and use that like so: