Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

grandM

macrumors 68000
Original poster
Oct 14, 2013
1,551
309
So I just looked and saw that iOS supports png, jpg and gif. I hoped to drag svg into xcassetts but that seems to be a no go?
 
Use PDF and set as single vector and Xcode will automatically scale and export the images on build for you.

Only PDF is supported I believe.
 
  • Like
Reactions: grandM
Use PDF and set as single vector and Xcode will automatically scale and export the images on build for you.

Only PDF is supported I believe.
So I export the image as pdf and drag it into xcassetts?
 
I'm sure OP can use Goog.le but here's a few relevant answers

Good description of how things work
http://stackoverflow.com/questions/25818845/how-do-vector-images-work-in-xcode-i-e-pdf-files

Another review with a slightly different perspective, check out the UIImage+PDF category he mentions but this may not be necessary.
http://mattgemmell.com/using-pdf-images-in-ios-apps/

Blog: Why I don't use PDFs for iOS assets
https://bjango.com/articles/idontusepdfs/

OP doesn't mention if he expects the images to be dynamically scalable (i.e., in response to a user's touch) or just to have different sizes of the same image. The referenced posts don't address dynamically scalable images.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.