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?
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With