I would like to download some icons from Webservice for different sizes (1x, 2x and 3x) - but when there is no image name with x2 at the end, ios always uses it as 1x.
I already found some answers that you must specify a url with imagename@2x.png - so that iOS can recognize a Retina image, but how should it work correctly with deleted images for three sizes?
In my case, the Webservice, which can provide images of all sizes, turned out badly. I would like to specify the correct size for the device with url.
For example:
http://example.com/x2/image.png
or
http://example.com/x3/image.png
I usually use Images.xcassets poorly to provide all different sizes, but this time I would like to upload images remotely. How to check which size is suitable for your device? Do I have to request a screen resolution (or for iPhone Type?) To check which image should load?
And how can I tell UIImageView that the image coming from this URL:
http://example.com/x3/image.png
equal to 3x (so do not increase it 3 times)?
Thank you in advance
source
share