0

I have images supporting 1x, 2x and 3x.

Images are placed into an image set into the respective 'containers': 1x, 2x, 3x.

In Image attributes, I selected 'universal'.

However, during testing we can see that the images are blurred on an ipad (tested with ipad 2).

Not sure what am I doing wrong. Do I have to explicitly select device image set (e.g. ipad image set)?

Do I have to explicitly append 1x, 2x and 3x to the image name? For example, my-image@2x.png?

I have no issues across all iphones (4S, 5, 6/+, 6s/+, se).

I looked at various answers including this one but I am still not clear why my images are blurred on an ipad.

App icon is NOT blurred!

Icons are added to the view as follows:

  • toolbar items - images are set in storyboard using the image set name
  • tab icons on UITabBarController - added via storyboard using the image set name
  • map annotation callout - callout button image set with:

    leftButton.setBackgroundImage(UIImage(named: navigateCue) , forState: .Normal)

Should also state that all my icons follow these guidelines provided by apple.

Also, on a simulator everything is fine...

This is how my folders are set:

  • In Images.xcassests I have a directory called multi-res.
  • In this top level directory I have sub-folders associated with the 'role' of the images (e.g. toolbar).
  • Each of the subfolders contain image sets (e.g. pins). An image set is named as 'red' (for red pins).
  • Within each image set I have 3 images: <base>.png, <base>@2x.png and <base>@3x.png
  • I have checked all images in both finder and sketch. They are exact in size and multiples. So if the <base>.png is 24x24, the <base>@2x.png is 48x48 and the <base>@3x.png is 72x72.

Everything works fine on all iphones (4s, 5, 6/+, 6s/+, se) and new ipads.

The issue remains with old gen ipads such as ipad 2.

I followed apple's guidelines stated here.

Do I need to create images with ~ipad extension too just for ipad2?

Do I need to have a @2x-1.png, @2x-2.png? If so, how do I create all these folders under an image set?

Something else?

Community
  • 1
  • 1
zevij
  • 2,416
  • 1
  • 23
  • 32
  • You need to update your question with specific details about how the icons are being added to the view. – rmaddy Apr 29 '16 at 19:23
  • You can easily end up with blurry images if the images are _displayed_ badly. A UIImageView that has to shrink its image to display it, or that doesn't have integer coordinates, can result in information loss and antialiasing which can come across as blurring. – matt Apr 29 '16 at 19:47
  • Also you say: "Images are placed into an image set into the respective 'containers': 1x, 2x, 3x." But that doesn't prove these images _are_ 1x, 2x, 3x with respect to one another. Doing that is up to you. It doesn't happen automatically. – matt Apr 29 '16 at 19:49
  • ok. So when I have toolbar items with flexible space between them how do I know the exact location? I could possible force the position to be on an integer value. On the other hand, how can I control the coordinates of a tabbar item image? All my images are as per apple's guidelines for 1x, 2x and 3x. – zevij Apr 29 '16 at 19:50
  • are you sure that your 1x, 2x and 3x images match the proportions exactly? I have worked with designers who for some funny reason would send me images with half point size. like 43.5 x 43.5. After coming across a bunch of such images, made a rule that both dimensions of the 1x image has to be an even number. (sometimes, the Finder will show whole size, but an image editing tool will show the real size of the image. Verify the image dimensions with Sketch, Photoshop or something similar) – Nitin Alabur Apr 29 '16 at 20:21
  • Interesting. Will double check. Did not realise that finder would should whole numbers and an image tool might show .5 points. Would Preview be sufficient or do I need to use something else? – zevij Apr 29 '16 at 20:38
  • hmmm....checked with Sketch. All sizes are as stated. Must be something else. I'll try with dedicated sets (i.e. one for iphone and one for ipad). Maybe that will make a difference :( – zevij Apr 29 '16 at 20:57

0 Answers0