Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use vector images in Xcode 6.4

I've drawn up an image in Adobe Illustrator CS6. I export/save the image as a PDF. In Xcode, I create an image set and set the scale factor to Single Vector.

Yet when I use the image in my app, it still appears pixilated.

I've used vector images in older versions of Xcode (6.1 & 6.2) and it worked fine. Why is it not working in 6.4?

like image 378
Schuey999 Avatar asked Sep 12 '15 16:09

Schuey999


People also ask

What is Xcode preserve vector?

If you enable “Preserve Vector Data” this feature comes to your apps with no additional work. By enabling this feature, iOS 11 can also automatically scale images regardless of whether you're increasing a UIImageView 's bounds, or using Size Classes to change an UIImageView size.


1 Answers

Try this article. It describes how to save vector image correctly and how to use it in Xcode.

IMPORTANT TO KNOW: Xcode slices your vector image to needed dimension. E.g. if you'll put 50x50 vector image it will create 50x50(x1), 100x100(x2), 150x150(x3) images. So you should to save original vector image for x1 dimension.

like image 67
Alexey Bondarchuk Avatar answered Sep 24 '22 19:09

Alexey Bondarchuk