I am developing game with SpriteKit for iPhone devices only. In the scene I have buttons, which need to be positioned in the way to fill the height of the screen:
There should be no gaps between top and bottom edges, as well as from each other. The width can vary. Buttons contains vector ornaments, done in AI.
In order to achieve that, I thought I could use PDF asset, set to "single scale" and "Preserve Vector Data". Then I thought I can get slightly resized PNG file out of PDF and reposition then based on client area. However, it appears SKTextureNode doesn't take PDF as source. I get blurry image.
The code for loading image:
let texture = SKTexture(imageNamed: "BuyButton")
let node = SKSpriteNode(texture: texture, size: CGSize(width: 81*4, height: 165*4)) // PDF size is 81x165
This works just fine with UIImageView, where you can set any size and it will give you crisp image. I can guess that there is some magic routine somewhere in UIImageView, which forces to create new image of given size.
So my question is whether there is a way to engage this magic routine for SpriteKit?
