cocos2d-1.0.1-x-0.10.0版本 设置横屏与竖屏的方法
设置横屏与竖屏的方法
找到RootViewController.m这个文件,打开
找到这个方法
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// return YES for the supported orientations
// Only landscape  仅支持横向
// return ( UIInterfaceOrientationIsLandscape( interfaceOrientation ) );
// Only portrait    仅支持竖向
// return ( ! UIInterfaceOrientationIsLandscape( interfaceOrientation ) );
// All orientations  既支持竖向又支持横向
// return YES;
}
 
                    
                     
                    
                 
                    
                 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号