您的位置:首页 > 移动开发 > Cocos引擎

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

2013-10-21 20:25 281 查看
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



折磨了很久,版本不一样头疼。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: