pRivaT3 BuG
pRivaT3 BuG

Reputation: 246

Keep Image Size Proportional + Work with SVG

Language : Swift 3 ---- IDE : Xcode 8 ---- iOS SpriteKit Project

I use a png image loaded in Assets.xcassets and used in program as SpriteKitNode. I created the project working on iPhone SE Simulator. Although If I run the game on another iPhone or iPad images still stay small. (I have the same image made also for x2,x3). Is there a way to load an image and use it proportional to the screen size?

Also I read that on iOS the best image format to work with is SVG. Does anyone know how to work with it? I tried to load a svg image on Assets.xcassets but it doesn't load. Then I dragged the svg image in my project and still couldn't load it on a SpriteKitNode.

Upvotes: 2

Views: 464

Answers (1)

Keith
Keith

Reputation: 141

Xcode doesn't support SVG yet. It does support PDF though so if you can export/save your SVG as a PDF, you can import that into your assets catalog and get all the scaling goodness of SVG.

Upvotes: 3

Related Questions