image autoresizing problem in sprite kit

Discussion in 'iOS Game Development' started by nitin kale, Jul 24, 2015.

  1. nitin kale

    nitin kale Newbie

    Hi I am newbie in iOS and working on game development using spritekit.My problem is that images added on spritekitnode are properly fitted on iPhone 6 plus but going outside the screen for iPhone 5,4 and other version. i have also tried slalomed properties of skscene but still its not working
    somebody please help me.
     
  2. nitin kale

    nitin kale Newbie

    Hi I am newbie in iOS and working on game development using spritekit.My problem is that images added on spritekitnode are properly fitted on iPhone 6 plus but going outside the simulator screen for iPhone 5,4 and other version. I have also tried scalemode properties of skscene but still its not working
    somebody please help me.
     
  3. damponting44

    damponting44 Banned

    i just began another Sprite Kit venture to figure out how to utilize it. I watched and read a considerable measure of instructional exercises however no instructional exercise has a solution for my question/issue.

    I need to make an application only for my iPhone 5S. So the screen size is 1136x640. I made a 1136x640 foundation picture for my application. In any case, when i add the picture to my application, its waaay to enormous! The iOS Simulator just shows the center of the picture.

    Can somebody let me know what screen measure i need to utilize and why?

    Much appreciated!

    Here is the code which i replicated from an instructional exercise. The code is in the myScene.m record in the initWithSize strategy

    SKSpriteNode *background = [SKSpriteNode spriteNodeWithImageNamed:mad:"myBackground"];

    background.position = CGPointMake(CGRectGetMidX(self.frame),CGRectGetMidY(self.frame));

    [self addChild:background];
     
  4. Bebler App

    Bebler App Newbie

    Any feedback about the initial inquiry?
     
  5. sukha0053

    sukha0053 Newbie

    thanks for this helpful thread.
     

Share This Page