iPad3 HD Black Screen in Portrait Orientation
- by Jason Brooks
I'm currently updating my game using XCode 4.3.1 and an iPad3. WHen iPAD HD mode is selected, I get a black screen when I change the scene from the AppDelegate.
I'm using COCOS2d v1.0.1
My Game is portrait only mode, and I think I've tracked the problem down.
If you create a new project with the default HelloWorld Layer, it works on the iPad3 and it's simulator in HD.
However if you change the following code :-
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
...
#elif GAME_AUTOROTATION == kGameAutorotationUIViewController
//
// EAGLView will be rotated by the UIViewController
//
// Sample: Autorotate only in landscpe mode
//
// return YES for the supported orientations
//return ( UIInterfaceOrientationIsLandscape( interfaceOrientation ) );
return ( UIInterfaceOrientationIsPortrait ( interfaceOrientation ) );
//return NO;
...
}
In RootViewController.m
You see a black screen for the iPad3 real device and simulator. It works as expected on all devices, iPhone/iPod Touch, and iPad 1 and 2.
If I change the statement back to
return ( UIInterfaceOrientationIsLandscape( interfaceOrientation ) );
I get the Hello World rendered to the screen, but it is in landscape only on iPad3.
Has anyone else encountered this and have any suggestions for a fix?
The project is quite large to upgrade to the latest V1 Beta code.