0

For universal application if only ipad retina images are used , then would thier be a performace degrade for iphone ? since iphone would be using same images , just UIImageview would be scaling it according to screen size .

Regards

H Bastan
  • 259
  • 1
  • 2
  • 11

2 Answers2

1

When you are creating images for a universal app, let's say you created a image called 'example'.

You should save the following:

  • example~iphone.png -> this is for non retina iPhone
  • example~iphone@2x.png -> this is for retina iPhone
  • example~ipad.png -> this is for non retina iPad
  • example~ipad@2x.png -> this is for retina iPad

So, doesn't matter from where you call it, you just call it this way, assuming myImageView is a UIImageView object:

[myImageView setImage:[UIImage imageNamed:@"example"]];

The OS takes care of finding the correct image for the desired device.

Natan R.
  • 5,141
  • 1
  • 31
  • 48
1

Performance shouldn't degrade substantially (or, even, noticeably in most cases). However, image quality may.

Assuming a 100px squa Retina iPad image, this will be scaled to 50% on a non-retina iPad (50px square) and it will probably look pretty good. However, unless you design your iPhone interface to use images that have a similarly simple scaling, you may find that UIImageView's scaling (or UIButton's or...) is less elegant that you would like.

You can use tricks to minimise this (the sort of things covered by the Thomas Fuchs's book at http://retinafy.me/) but image quality won't be as good as it will if you serve optimised images for each device and resolution.

Wildaker
  • 2,533
  • 1
  • 17
  • 19