1.官网下载Cocos 引擎
2.创建工程
3.打开工程的中的ios工程
4.设置为竖屏
*/
// Override to allow orientations other than the default portrait orientation.
// This method is deprecated on ios6
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
returnUIInterfaceOrientationIsPortrait( interfaceOrientation );
}
// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead
- (NSUInteger) supportedInterfaceOrientations{
#ifdef __IPHONE_6_0
returnUIInterfaceOrientationMaskPortrait;
#endif
}
AppDelegate的applicationDidFinishLaunching中修改为:
director->getOpenGLView()->setDesignResolutionSize(640,960,ResolutionPolicy::NO_BORDER);