1

I have an app that uses a combination of storyboards and GLKViews that is targeting ios7. In Xcode 6 with the iPhone 6 simulator target, everything scales up correctly to fit the larger screen size. The app thinks it is running on a 320 x 568 screen but everything scales including some GLKView objects.

If I switch to the iPhone 6 Plus simulator, everything but the GLKView objects scale up correctly. The GLKView objects are rendered unscaled. For a full screen (0,0,320,568) rectangle GLKView object, I need to use the following rectangle for it to fill the screen approximately right:

CGRectMake(0, 568 - 854, 480, 854)

480 = 1242 (native screen res) / 2x (2x retina emulator) / (414 / 320)

414/320 is the scaling done by the OS to stretch the app.

It seems like Apple just forgot to scale the GLKViews for the iPhone 6 Plus for some reason.

Has anyone seen this or have a workaround? Beyond the rendering, the touchPoint need some sort of coordinate translation to work as well.

Werner Sharp
  • 301
  • 1
  • 2
  • 7
  • 1
    This post: http://stackoverflow.com/questions/25824333/can-i-still-publish-ios-apps-without-iphone-6-launch-images-apps-that-run-in-sc/25824375#25824375 Gives a good hint. The contentScale of the GLKViews is wrong. They are 2x scaled instead of 3x scale. So you need to add a 1.5x scaling factor for anything you put in draw in the GLKView for iPhone6+ in the simulator. – Werner Sharp Sep 15 '14 at 19:59
  • 1
    The way to fix this for iOS8 is to use the "nativeScale" property instead of "scale" on UIScreen. nativeScale is 3x while scale is 2x. – Werner Sharp Sep 19 '14 at 13:26

0 Answers0