I just want to use one set of image asserts for all iPhones and iPads(Universal), Is it possible to do the same? or what will be the best solution for the making a build lighter.
Can we use just one set of image assert for all resolutions in iOS Development
408 Views Asked by Haroon At
2
There are 2 best solutions below
1

Yes, if you use a retina image without the @2x or @3x in the name and your UIImageView
is set to ScaleToFill
it will automatically scale down your image on non-retina devices. it is easy to test with the simulators to see how the image will look at the different screen resolutions.
the trade off is non retina devices will suffer with more memory usage than is needed for them (and usually the non-retina devices are some what limited in memory already compared to the latest apple products) but if you arent dealing with a lot of images on the screen at once then this shouldnt have an adverse effect
YES, it is possible ti use one image asserts for all devices. just add
new image set
in assert by Right click. And the add images for required devices in created
Image set
.you can use Image set but it's name,and images are automatically loaded with different devices.
UPDATED
if you want to
titlelogo.png
for all device then makenew image set
in Images.xcassets and name it asAssetTitlelogo
. and the add all images in it as in screenshot.You use image by
It's load right image for right Device..