How do I properly use standard and retina display icons in iOS? Do I need to detect the resolution of the device? If so, what is the best procedure to do this. Do I need to do something similar to the follow?
UINavigationBar *navbar...
NSString *imageName;
if (isRetinaDisplay)
{
imageName = @"hello@2x.png";
}
else
{
imageName = @"hello.png";
}
navbar.tabBarItem.image = [UIImage imageNamed:imageName];
Any suggestions would be appreciated. Thank you.
No, you don’t. iOS will automatically detect and use
@2ximages on hi-res devices. Check out the Drawing and Printing Guide for more information. An excerpt: