Anyone knows how I can replace the orignial icon with the retina version of it, if the user have a iOS with retina display?
I've tried with data-mask="[name]@2x.[ext]" but without luck. Hope someone have a solution
You have to include two files in your project: image.png
and image@2x.png
. But it's not necessary to write @2x
-suffix in code. Just:
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"image.png"]];
iOS will automatically detect, what image should be used.
As you can see here: http://d.pr/P7an Any suggest - Simon Thomsen 2012-04-04 08:22
I'm using the following approach:
On non retina displays this will stretch the original image to 50%. For my personal taste the result looks more than OK.
On retina displays this will practically result in a 1-to-1 mapping between image pixels and device (real) pixels.
I have to mention that I didn't test this with Phonegap, but used it in a MonoTouch project, with a web container.