简体   繁体   中英

Download Asset catalog from internet for images

In xcode, we have asset catalog which asks for 1x, 2x, 3x images. How do I downloading this asset catalog from the Internet?

I want to upload the images on an URL and download 1x,2x,3x based on the device type.

Are there some best practices / code which sends users agent and the server decides which Image it should send to the device?

There is no reason to download all resolutions, because you already know for what type of device the images are needed. Just grab device type, scale etc and then get the specific image needed. That way you save bandwidth and some space on the user's device.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM