1

I am building a game with swift and sprite kit and I want to place a sprite on the very top of the screen.

when I do sprite.position = CGPoint(x: 0 , y: self.frame.maxY) on an iPhone it places the sprite on the top, however on an iPad it does not show anywhere (I'm guessing the sprite is above the max Y value of the iPad)

how can I make it so the sprite is on top of the screen for both the iPad, and iPhone. Thanks

Arjun
  • 358
  • 5
  • 14

1 Answers1

0

Did you try increasing the x:0 value If increasing this value shows the Sprite. The problem is most likely your project using GameScene.sks

Don Firth
  • 21
  • 3
  • This won't do anything. His problem is his scene is 9:16, but an ipad is 3:4. so maxY is being cropped off due to the different aspect ratio. – Knight0fDragon Aug 13 '18 at 12:59