Cocos2d-x Portrait on iOS

To make you game portrait on iOS don't click the check boxes that set the orientation in Xcode - this won't work.

Instead, change these two methods in to match this:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return UIInterfaceOrientationIsPortrait( interfaceOrientation );

// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead
- (NSUInteger) supportedInterfaceOrientations{
#ifdef __IPHONE_6_0
    return UIInterfaceOrientationMaskPortrait;


No comments:

Post a Comment