Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 8 import pdf (vector) intro image assets not working well

Tags:

xcode

vector

I drag pdf intro image assets (universal) and building Xcode.

There is no generated png@2 png@3 . (only Pdf)

I follow this tutorial : https://icons8.com/articles/how-to-use-vectors-in-xcode-7/

When I start app on the device images are so bad quality...

enter image description here

Xcode 6, 7 working .... Maybe PDF file needs optimisation ?!

In research I found "size of svg is not important" but in this case it is (I test it).

like image 835
Nikola Lukic Avatar asked Sep 20 '16 09:09

Nikola Lukic


1 Answers

Not sure if this helps, but from what I was reading about this, Xcode doesn't fully support vector graphics. It sounds like instead of you being able to load a vector image (.pdf) and it scales however necessary. Instead, whatever the default size of your .pdf is, it'll assume that is the 1x size, then scale the pdf to automatically create the 2x and 3x image when it's built. So its not actually scaling the original, just creating a 1x, 2x, and 3x png of the original size of your pdf. From what I'm reading, people are thinking this is done to maintain backwards compatibility. I couldn't find anything that says it has changed in Xcode 8, so I'm assuming it still works the same way.

This question seems to answer it well: How do vector images work in Xcode (i.e. pdf files)?

Hope I was able to help.

like image 61
Jason Brady Avatar answered Oct 20 '22 02:10

Jason Brady