Search code examples
iosxcode8assets

PDF image for iOS Assets


we can add image as pdf in ios assets for application.But i'm confusing that which approach is good for application.

  • Png file direct drag and drop to Assets
  • or use image as PDF

i have follows links https://icons8.com/articles/how-to-use-vectors-in-xcode-7/ and https://bjango.com/articles/idontusepdfs/ but not able to decide which one is better solution for assets. i know how to works with pdf asset but cannot decide which method is better from development point of view.

Thanks in advance.


Solution

  • If your artwork has complex gradients, generate the PNGs yourself. Otherwise, use PDFs. That's how I read it.

    Personally, I have the luxury of working with a designer who just gives me assets at all the required sizes. On another project, Sketch was used which can auto-generate PNGs from a script as part of the build process. So I've never actually used PDFs.