在 AppDelegate::applicationDidFinishLaunching()中
auto director = Director::getInstance(); auto glview = director->getOpenGLView(); if(!glview) { glview = GLView::create("My Game"); glview->setFrameSize(540,960); director->setOpenGLView(glview); } glview->setDesignResolutionSize(540,960,ResolutionPolicy::EXACT_FIT);
其中(540,960)为项目设计size
改为自己项目size就可以了