2
AppDelegate.m의 코드 아래에 이미 추가되었지만 세로 방향으로는 여전히 작동하지 않습니다. Cocos2d 3.0 세로 방향 설정
AppDelegate.m의 코드 아래에 이미 추가되었지만 세로 방향으로는 여전히 작동하지 않습니다. Cocos2d 3.0 세로 방향 설정
있어 솔루션 : 여기
-(NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskPortrait;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsPortrait(interfaceOrientation);
}
은 엑스 코드 요약 페이지입니다. setupCocos2dWithOptions에서 방향을 설정할 수 있습니다.
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[self setupCocos2dWithOptions:@{
CCSetupShowDebugStats: @(YES),
CCSetupScreenOrientation: CCScreenOrientationPortrait,
}];
return YES;
}