LoginSignup
2
1

More than 5 years have passed since last update.

Cocos2d-x 縦モニター方法

Posted at

まず QQ270705-1@2x.png
そして OPEN THE RootViewController.MM
Find this void 【
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return UIInterfaceOrientationIsPortrait( interfaceOrientation );
}

UIInterfaceOrientationIsPortrait( interfaceOrientation ) <---keyPoint

// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead
```- (NSUInteger) supportedInterfaceOrientations{

ifdef __IPHONE_6_0

return UIInterfaceOrientationMaskPortrait;

endif

}
**UIInterfaceOrientationMaskPortrait** <---keyPoint
- (BOOL) shouldAutorotate {
return NO;
}```
NO <---keyPoint

そして 縦モニターは完成しました〜

2
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
2
1