How to disable iPhone 6 native resolution?

二次信任 提交于 2019-12-17 12:05:37

问题


I have several games made with Cocos2d-iphone. All of them are old projects created with Xcode 4 or 5. All games scale fine on the new iPhone 6 and 6 Plus except one that seems to avoid the scaling mode and is running on native iPhone 6/6 Plus resolution. The project does not contain Launch images with the resolutions that seem to disable the scaling mode as explained here

Is there anything else that unlocks the native resolutions? I want the game to run in scaling mode for now until the HD assets are ready for the new resolutions.

I've made a new empty project that does not have any assets and it is working with the native screen sizes.


回答1:


1. Is there anything else that unlocks the native resolutions?

No for older projects you can only unlock native resolutions by adding launch images

2.I've made a new empty project that does not have any assets and it is working with the native screen sizes.

If you create project from XCode 6 naive resolution will be automatically enabled even if launch images are not added. I just created new sample project from Xcode 5.1.1 and than ran it on Xcode 6 and naive resolution was not enabled and views were scaled in order to fit the screen.

Hope that clears the confusion as your project are old as you mentioned naive resolution will not be enabled unless you add launch images.

Correction

Based on comments i am correcting my answer for projects created in XCode 6 you can delete Launch Screen File and also not add any iPhone 6/6+ specific launch images. The app will not run in native iPhone 6/6+ resolution.

So For iOS8 you can have either Launch images for iPhone 6 and 6 Plus or a Launch Screen File




回答2:


Bhumit is partially right, but I believe there is one missing detail. To disable native resolution (and ensure scaled resolution) I did the following:

  1. Remove LaunchScreen.xib from project as well as any iPhone 6/6+ launch images you may have.
  2. In your app's target, go to General, and under "Launch Screen File" blank out the entry.
  3. Clean and rebuild


来源:https://stackoverflow.com/questions/25891277/how-to-disable-iphone-6-native-resolution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!