I am trying to do something that should be very simple in Xcode, I am trying to add a sprite to the scene and sit in the lower left corner:
var groundTexture : SKTexture = SKTexture(imageNamed: "dirt-block") var ground : SKSpriteNode = SKSpriteNode(texture: groundTexture) ground.position = CGPointMake(ground.size.width/2, ground.size.height/2) self.addChild(ground)
This shows nothing, so I looked at what the size of the scene is, and self.frame.size.width and self.frame.size.height return a width of 1024 and a height of 768, regardless of orientation.
I want this to be fixed in landscape mode, if that has any meaning for the answer?
Obviously, I missed a very fundamental idea related to setting up the scene, if someone could shed some light, that would be very grateful.
Thanks.
source share