Cocos2d-x 縦画面の設定

RootViewController.mm
[c]
// Override to allow orientations other than the default portrait orientation.
// This method is deprecated on ios6
– (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
//縦画面対応
return UIInterfaceOrientationIsPortrait(interfaceOrientation);
//return UIInterfaceOrientationIsLandscape( interfaceOrientation );
}

// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead
– (NSUInteger) supportedInterfaceOrientations{
#ifdef __IPHONE_6_0
//縦画面対応
return UIInterfaceOrientationMaskPortrait;
//return UIInterfaceOrientationMaskAllButUpsideDown;
#endif
}

– (BOOL) shouldAutorotate {
return NO;
}

[/c]

This entry was posted in C++, cocos2d-x, 技術情報. Bookmark the permalink.

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です