Saturday, 15 August 2015

ios - Sprite Kit is resizing an image and altering the aspect ratio -



ios - Sprite Kit is resizing an image and altering the aspect ratio -

i'm trying add together background sprite in sprite kit using xcode 6 beta, image size 1136 640 pixels, size of iphone screen in landscape. because deployment target of app ios 7.0 , higher, can't utilize images.xcassets catalog (it doesn't show images in lower ios 8). when run project on either device (iphone 5s on ios 7.1.1) or ios 8 simulator, image stretched wider , shorter screen despite identical resolutions.

i can't help sense may issue xcode 6 or because i'm not using image catalog. below code , screenshot:

override func didmovetoview(view: skview!) { allow background = skspritenode(imagenamed: "loading.png") background.zposition = -1 background.position = cgpointmake(self.frame.width/2, self.frame.height/2) self.addchild(background) }

any help appreciated, has been frustrating me.

ios image sprite-kit swift xcode6

No comments:

Post a Comment