【发布时间】:2015-11-25 17:24:56
【问题描述】:
Xcode:7.1,运行于:iPhone 6s Plus
我的 AppDelegate.mm 有以下代码:
- (void) applicationDidFinishLaunching:(UIApplication*)application
---------some code
#if GAME_AUTOROTATION == kGameAutorotationUIViewController
NSLog(@"if");
[director setDeviceOrientation:kCCDeviceOrientationLandscapeLeft];
#else
NSLog(@"else");
[director setDeviceOrientation:kCCDeviceOrientationPortrait];
#endif
---------somecode
我的 GameConfig.h 有:
#define GAME_AUTOROTATION kGameAutorotationUIViewController
我的 RootViewController.m 有:
if GAME_AUTOROTATION == kGameAutorotationUIViewController
return ( UIInterfaceOrientationIsLandscape( interfaceOrientation ) );
【问题讨论】:
-
使用了哪个cocos2d版本?
标签: ios objective-c xcode cocos2d-iphone