1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Cocos2d v2.0で画面を縦表示にする

1
Posted at

AppDelegate.mとInfo.plistを以下のように修正することで動いた。

AppDelegate.m
// Supported orientations: Landscape. Customize it for your own needs
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    //return UIInterfaceOrientationIsLandscape(interfaceOrientation); ←修正前
    returnUIInterfaceOrientationIsPortrait(interfaceOrientation); // ←修正後
}
Info.plist
Supported interface orientations

Item 0 Landscape (left home button)
↓
Item 0 Portrait (bottom home button)

Item 1 Landscape (right home button)
↓
Item 1 Portrait (top home button)
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?