IOS目录中RootViewController.mm
//显示竖屏
- (BOOL) shouldAutorotate {
return NO;
}

//显示横屏
- (BOOL) shouldAutorotate {
return YES;
}

还有一个屏目适配:

AppDelegate 中:

CCDirector* pDirector = CCDirector::sharedDirector();

    CCEGLView* pEGLView = CCEGLView::sharedOpenGLView();

 

    pDirector->setOpenGLView(pEGLView);

 

    pEGLView->setDesignResolutionSize(320 ,480, kResolutionNoBorder);//这个是跟据图片的大小来设置

相关文章:

  • 2022-12-23
  • 2021-05-21
  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-26
  • 2021-11-16
  • 2021-12-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案