Question

I have a universal app and I have made my xibs so they can work with iPhone or iPad. However I am getting memory warnings because the UIImages are big. Is there a way to name my image files so that when running on the iPad it will use the iPad images and when on the iPhone it will use the iPhone ones?

Update: Well that was easy.

  • iPhone : image.png
  • iPhone 4 : image@2x.png
  • iPad : image~ipad.png

I wonder if this will work if I render the images on device and store them locally?

Was it helpful?

Solution 2

Well that was easy.

  • iPhone : image.png
  • iPhone 4 : image@2x.png
  • iPad : image~ipad.png

I wonder if this will work if I render the images on device and store them locally?

OTHER TIPS

I hope this might give you some hint

I use images with name button.png and button@2x.png and make a call using

 [UIImage imagesNamed:@"button.png"];

This loads the correct image on all device according to the resolution of the device, say iPhone3g, iPhone4 and iPad. As in the update you have taken s separate image for iPad, i really doubt that as simply the same image i.e button.png would work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top