The app is set up for only landscape.
In Project->target->Summary->Supported Interface Orientations, I enabled the 2 landscape icons (both left and right).
And in AppDelegate.m, the below code is written:
- (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
When the app is running on the device, the view showed at the beginning after the default cocos2d icon, all the positions are wrong which were all moved to the right-down side. When I rotate the screen, everything goes right, all in right position.
What's wrong?
I also tried the method below: I disable all the icons in In Project->target->Summary->Supported Interface Orientations. The code in AppDelegate still in use. Then the view at the very beginning is ok but the screen can be rotated to protrait.
....
Any one can help?