Hey Daniel, I noticed that the frame size in SPViewController's viewDidLoad displays portrait dimensions even though the app could be in landscape orientation. I was trying to figure out why it does that, but haven't had any luck.
The custom UIViewController's I've implemented show the correct frame size in my viewDidLoad functions, but I am loading a custom nib.
As a work around I added the following code to my SPViewController SubClass in the viewDidLoad. I just check what the orientation is for the ViewController and if its landscape I readjust the stage and view. I didn't need to factor the viewScaleFactor and contentScaleFactor.
The only reason I needed to adjust the frame and stage size in my viewDidLoad is because I am animating to the SPViewController. Otherwise it animated in at portrait orientation and on viewDidAppear readjusted to landscape.
Not sure if there is a better way to achieve this, but that was my solution. Could be useful to implement or useful to someone trying to achieve the same thing.
//set view and stage bounds to correct orientation
UIInterfaceOrientation interfaceOrientation = self.interfaceOrientation;
CGSize screenSize = [UIScreen mainScreen].bounds.size;
float width = screenSize.width;
float height = screenSize.height;
if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
interfaceOrientation == UIInterfaceOrientationLandscapeRight)
{
width = screenSize.height;
height = screenSize.width;
}
self.view.frame = CGRectMake(0, 0, width, height);
self.stage.width = width;
self.stage.height = height;