Last active
October 21, 2015 16:31
-
-
Save tadamatu/742ad35e667f472d34ae to your computer and use it in GitHub Desktop.
cocos2d-xの画面の向き(縦横)は設定だけでは済まないのでまとめておく ref: http://qiita.com/tadamatu/items/98a9539ab3dd951489f5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<activity android:name="org.cocos2dx.cpp.AppActivity" | |
android:label="@string/app_name" | |
android:screenOrientation="portrait" //★この部分★ | |
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" | |
android:configChanges="orientation"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Override to allow orientations other than the default portrait orientation. | |
// This method is deprecated on ios6 | |
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { | |
//return UIInterfaceOrientationIsLandscape( interfaceOrientation ); //横 | |
return UIInterfaceOrientationIsPortrait( interfaceOrientation ); //縦 | |
} | |
// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead | |
-(NSUInteger) supportedInterfaceOrientations{ | |
#ifdef __IPHONE_6_0 | |
//return UIInterfaceOrientationMaskAllButUpsideDown; //横 | |
return UIInterfaceOrientationMaskPortrait; //縦 | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment