3

When adding a PDF resource to an asset catalogue, selecting "vectors", and configuring the slicing, this slicing does not behave as expected. The image gets stretched in Interface Builder and on the device weird results can be seen. However I don't seem to find any confirmation about the fact that slicing doesn't work on vectorial assets.

Can anyone shed a light on this?

Xcode 6, iOS8.

Thanks!

Joris Mans
  • 6,024
  • 6
  • 42
  • 69

2 Answers2

1

I have been trying to get this to work today. Seems that Xcode will slice a 2x PDF image as if it were a 1x. That means if you set an inset of 15points, Xcode will set the inset at 15 pixels, not 15 points, so it ends up being half of what you wanted. Can't seem to find any way around this. Have to do it in code instead of Interface Builder. Thanks, Xcode.

Sparklellama
  • 712
  • 1
  • 6
  • 18
1

I think the conclusion (at this point in time) is: It's broken

Joris Mans
  • 6,024
  • 6
  • 42
  • 69
  • Just tried this with Xcode 8, tested on iOS 9 (iphone6s) and iOS 10 (iPhone 7 plus)and it seems to work so far. – Jonny Nov 25 '16 at 03:43