I am trying to put an image in the right button of a navigation element through the following code
//Add image to right bar button in navigation bar UIBarButtonItem *rightBarButton = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"refresh.png"] style:UIBarButtonItemStyleBordered target:self action:@selector(getData)]; self.navigationItem.rightBarButtonItem = rightBarButton; [rightBarButton release];
Image I have a size of 52 X 52 pixels. If I simply add the image to the button without resizing, I get a disproportionate display, as shown below.

However, if I try to compress the image before adding to the button (18 X 18 pixels), the image will look blurry on the iPhone's retina screen

This also happens for tab stripes to display the retina of the iPhone.

Can I use a large image on a button or tab without getting a disproportionate display? Or is there a way to maintain image resolution?
source share