Saturday 15 May 2010

swift - iOS8 Retina @2x images not scaling like iOS7? -



swift - iOS8 Retina @2x images not scaling like iOS7? -

has way xcode 6.1 (ios 8.1) changed way images handled. in previous sprite kit game (xcode 5, ios 7) used next total screen image background:

mainbackground_ip5@2x.png // resolution: 640 x 1136, fills screen.

now in xcode 6.1 testing next code (see below), image using is:

mainbackground_ip6@2x.png // resolution: 750 x 1334

code:

func setupbackdrop() { println(__function__) allow backdropsprite = skspritenode(imagenamed: "mainbackground_ip6") backdropsprite.anchorpoint = cgpointzero backdropsprite.position = cgpointzero self.addchild(backdropsprite) }

however when run application both on simulator , device following.

note: if remove @2x fits fine, can,t understand whats changed, have not seen mentioned in sprite kit notes? loaded old iphone 5 game project , @2x backgrounds fit in that, must ios 8.

images should utilize @2x problem in gamescene.sks had entered screen resolution in pixels not points (should have been 375 x 667) there seems problem gamescene.sks on template, if add together items programatically did quite don't display. solution seems have add together @ to the lowest degree 1 node gamescene.sks (i added empty sknode)

swift ios8 sprite-kit

No comments:

Post a Comment