I wanted to use a retina resolution image (40x40p) on a panel element on my MVC navigation element. When I set the image, it looked stretched horizontally, as expected:

Note. I also have an image of a toolbar button that is in retina resolution (60px60p), as required by Apple spec . It was also stretched when the size parameters had default values, that is, width = 0, insertion; m = 0, B = 0, L = 0, r = 0:

However, unlike the navigator element, in the case of the toolbar, I could successfully change these values ββfrom IB. When I set the width = 30, and the inserts t = 5, b = 5, l = 5, r = 5, the toolbar button works fine:

When I used the size inspector and tried to set the width and insertion values ββof the navigation bar button element, this did not seem to have an effect. The image of the mechanism still looked stretched.
I also tried to create a panel button element in the code navigation element and set the width and insertion there, it did not work either:
UIImage *image = [UIImage imageNamed:@" 073-Setting@2x.png "]; //-------------------------------------------------------------------- // This line had no effect for a bar button item on a navigation item: image = [image resizableImageWithCapInsets:UIEdgeInsetsMake(5.0,5.0,5.0,5.0)]; //-------------------------------------------------------------------- UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithImage:image style:UIBarButtonItemStylePlain target:self action:@selector(handleBack:)]; //-------------------------------------------------------------------- // This line had no effect for a bar button item on a navigation item: button.width = 30; //--------------------------------------------------------------------
Any ideas that I am doing something wrong, or it seems like a mistake. My deployment goal is iOS 5.0.