2014-02-18 3 views

답변

7

있어 솔루션 : 여기

-(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; 
}