You don't need the @2x.png
as the system takes care of picking the correct images for you based on the -[UIScreen scale]
(png
hasn't been need since iOS 4 either).
See the docs (+[UIImage imageNamed:]
) for more info!
iOS 7 UINavigationBar Retina image size
-
06-07-2023 - |
Question
Here I have an image, backgroundTest1@2x.png, that is 640 x 128, with the red portion being 320 x 64.
But when I set the image like so:
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"backgroundTest1@2x.png"] forBarMetrics:UIBarMetricsDefault];
I get only red in the navigation bar:
What's going on here and what size and name should I be using in my iOS 7 / retina only app? If the '@2x' should be included, then how come 320 x 64 is the image size that 'works'?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow