ios - Why won't this image fit to the screen size? -
I posted a question yesterday to know why the phantom kit was distorting my image. I was given a very good answer, although this was only half-auxiliary for my problem.
I was asked to give the name of the image name @ 2x.png, then in the code only for the call name and this would be the problem. Unfortunately this was not working.
Before doing this I was getting this:
Code:
SKSpriteNode * background = [SKSpriteNode spriteNodeWithTitxture: [SKTtexture textureWithImageNamed: @" bgs.png "] Size: CGSizeMake (568,320)] ; Background.position = CGPaxMake (CGRactGetMIDx (self-frame), CGRactGet MDY (self-frame)); [Self compound: background]; But after renaming images, bgs@2x.png, and by writing BGS only in code, this is what I got:
code:
SKSpriteNode * background = [SKSpriteNode SpriteNodeWithTestxture: [Nominated image with Skeleton Texture: @ "BGS"]]; Background.position = CGPaxMake (CGRactGetMIDx (self-frame), CGRactGet MDY (self-frame)); [Self compound: background]; which is close to what I want but clearly still is not right.
Why will not it fit on the screen? What's happening is that this image expands too much or makes the image too small? Image Dimensions: 568 x 320 Game Orientation: Landscape
Your @ 2x image The size should be 1136x640 This will not do the trick by changing the name of the full screen bus.
Comments
Post a Comment