简体   繁体   中英

How to programmatically put vector images in iOS asset catalog

I am working on a card editor app. I wanted to show images in different screen sizes. I have read that new xcode suports pdf images and we don't need to put many images for different screens.

http://martiancraft.com/blog/2014/09/vector-images-xcode6/

According to that we have to put pdf in ios asset catalog. In my app images loaded from dynamically from a web service. Then how can i save pdf image programmatically in ios asset catalog.

If this is not possible what is the better approach for show images in differnt devices.

Xcode doesn't actually support vector graphics this way, It just resizes them to the correct size and includes them in the app bundle. So you have to have them available at compile time. You are going to have to decide at runtime which image to download.

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