iPad Pro View Size

While testing our current application we've run into an issue with the iPad pro. Our scenes our set up to be 1024x768 which works fine for iPad retina/non-retina and iPad mini. However on the iPad Pro, when transitioning to a scene, it will re-set the scene's size to 1366x1024. Now I know that the iPad Pro has a resolution of 2732x2048 (compared to 2048x1536 on the Air 2), but what I don't understand is why does the iPad Pro initially use the SKS view size, and then on first (and subsequent) transition(s) to another SKS, decide to change to try and match it's view size?


Consider the following. Both SceneA and SceneB are SKS files, each with a simple colored SKSpriteNode which takes up the full view (1024x768).

class SceneA: SKScene
{
    override func didMoveToView(view: SKView)
    {
        print( "SceneA" )
        print( self.size )
    }

    override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?)
    {
       self.view!.presentScene( SceneB(fileNamed: "SceneB")! )
    }
}


class SceneB: SKScene
{
    override func didMoveToView(view: SKView)
    {
        print( "SceneB" )
        print( self.size )
    }
}


Runing this simple example, gives the following print out

SceneA
(1024.0, 768.0)
SceneB
(1366.0, 1024.0)


I tried to manually set the view's size in GameViewController

skView.bounds.size = CGSizeMake(1024, 768)

but this had no effect.


Of course one approach is to manually set the size of each Scene on load

self.size = CGSizeMake(1024, 768)

which works fine for this simple example, but won't work when presenting subviews on the SKView.


class SceneB: SKScene
{
    override func didMoveToView(view: SKView)
    {
        print( "SceneB" )
        print( self.size )
       
        self.size = CGSizeMake(1024, 768)
    }
   
    override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?)
    {
        let scene = SceneC(fileNamed: "SceneC")!
        let view = SKView(frame: CGRect(origin: CGPointZero, size: scene.size))
        view.center = CGPointMake(self.size.width/2, self.size.height/2)
        self.view!.addSubview(view)
        view.presentScene(scene)
    }
}


where SceneC is a simple 512x384 SKS file consisting of a colored SKSpriteNode.


https://www.dropbox.com/s/ev8a1rlb0hp7q4r/Simulator%20Screen%20Shot%20Jan%2020%2C%202016%2C%201.42.41%20PM.png


Anyone have any pointers?

Look at the numbers:

Non-retina iPad: 1024x768

The scene size that you're seeing: 1366x1024

Note how that's approximately (768+768)x1024. (Two non-retina screens side by side.)


That strongly implies that you're not configuring your application correctly for iPad Pro support.

Thanks for the answer, but as per my post, I know that 1366x1024 is the defualt for iPad Pro, what I do not understand is why the iPad Pro initially use the SKS view size (1024x768), and then on first (and subsequent) transition(s) to another SKS, decide to change to try and match it's view size (1366x1024).


The above example only uses SpriteKit with a GameViewController in Storyboards. How is one suppose to support iPad Pro in this scenario? Have a size of 1366x1024 for all SKS files and let the system will automatically downscale for iPad 2/Mini/Retina (using a scale mode of AspectFill) ?

iPad Pro View Size
 
 
Q