View Full Version : Noob question about resolution (Retina vs Original)
Mar 21, 2011, 06:41 AM
I had an idea to get something really simple up and running on my phone as a way to learn. I just wanted to get a large image to scroll up and down (the image is the same width as the screen so horizontal scrolling isn't necessary). I've managed to do it but there's one problem. The image I chose is 640x4000 so that it'd fit the screen width perfectly and have enough room to scroll a bit. I made the scroll area the same dimensions. Then when I run it it ends up being 2x the width of the screen. I "fixed" it by halving the scroll area and the image size but why can't I get it to build it at retina display resolution? Is there a simple switch I'm missing?
Any help would be appreciated.
Mar 21, 2011, 06:54 AM
For retina you should have a seperate image with double the size. You should name it the same as your original image with the extension of "@2x.png" (eg. myImage.png and myImage@2x.png)
Please correct me if I am wrong.
Mar 21, 2011, 08:05 AM
:D It worked. Excellent. Thanks a lot. Appreciate it.
EDIT: Actually I'm just having one weird problem. To test what you said I made two pngs that were identical to the ones I was using previously. They were both blank with the text "1x" or "2x" on them. I quit XCode and replaced the original images in the project folder. When I restarted it showed the new plain images and when I ran it on the device I saw "2x" and I knew it worked. Then, I switched them out again for the old ones. Now, the device continues to show the plain "2x" image when I run the app. This image is completely deleted from my system (AFAIK). IB shows the correct images and the correct one shows up in the simulator. But when I run it on the phone I get the wrong image. Just in case it was cached I deleted the app from the phone and restarted. It still shows up. Any ideas?
EDIT: Well, renaming the images and readding the 1x to UIImageView worked.
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.