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?