0

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.

MAhipal Singh
  • 4,745
  • 1
  • 42
  • 57
  • Possible duplicate of [How do vector images work in Xcode (i.e. pdf files)?](http://stackoverflow.com/questions/25818845/how-do-vector-images-work-in-xcode-i-e-pdf-files) – Er. Khatri May 15 '17 at 08:51
  • @Er.Khatri, i know how to works with pdf asset. but my question is Which approach is better from point of development. – MAhipal Singh May 15 '17 at 09:03

1 Answers1

1

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.

Bart van Kuik
  • 4,704
  • 1
  • 33
  • 57