cocos2dの画面を縦方向に変更します。
画面を縦に変更
Appdelegate.mにある- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientationを変更します。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsPortrait(interfaceOrientation);
}
UIInterfaceOrientationIsLandscapeをUIInterfaceOrientationIsPortraitに変更します。
また、Info.plistにあるSupported interface orientationsを変更します。
LandscapeをPortraitに変更します。
ビルドすると画面が縦方向で表示されます。
Pingback: cocos2dでUIInterfaceOrientationMaskPortraitを指定しないとエラーがでた | 人生休暇中