xcode 4.6.3 用cocos2d-iphone+box2d模拟器设置竖屏问题

来源:互联网 发布:python的ddt怎么用 编辑:程序博客网 时间:2024/06/18 06:43


1,在AppDelegate.mm 文件中将下面的将注释掉

//-(NSUInteger)supportedInterfaceOrientations {

//

// // iPhone only

// if( [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone )

// return UIInterfaceOrientationMaskLandscape;

//    return  UIInterfaceOrientationMaskPortrait;

// // iPad only

// return UIInterfaceOrientationMaskLandscape;

//}

//

//// Supported orientations. Customize it for your own needs

//// Only valid on iOS 4 / 5. NOT VALID for iOS 6.

//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

//{

// // iPhone only

// if( [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone )

// //return UIInterfaceOrientationIsLandscape(interfaceOrientation);

//       return UIInterfaceOrientationIsPortrait(interfaceOrientation);

//        //return  UIInterfaceOrientationMaskAll;

// // iPad only

// // iPhone only

// return UIInterfaceOrientationIsLandscape(interfaceOrientation);

//    

//}


2 、在info.plist


折磨了很久,版本不一样头疼。