Question: I'm trying to create a custom iOS 8 keyboard. I am using Interface Builder to arrange the keyboard layout. I have two NIB files, one for iPhone 6 and one for iPhone 5.

There are certain apps that are "scaled" up for the iPhone 6. For these apps, I want to load the iPhone 5 NIB (the iPhone 6 NIB goes off the screen).

**Is there any way to determine if the current app running is running on "scaled" mode?**

Unfortunately checking UIScreen mainScreen's attributes does not give me a difference between native iPhone 6 app vs scaled iPhone 6 app.

Answer: 
In scaled app `[UIScreen mainScreen].scale` and `[UIScreen mainScreen].nativeScale` not be the same.
If your app is designed for iPhone 5 the `scale` and `nativeScale` properties will match when running your app on an iPhone 6 because both phones have a 2.0x native scale factor.

Instead, you can use `[[UIScreen mainScreen] nativeBounds]` to see the bounds of the screen in pixels. For example, when running an app designed for iPhone 5 on an iPhone 6 you'll see the bounds of an iPhone 5 (640x1136):

`Native Bounds: {{0, 0}, {640, 1136}}`

But when running an app designed for iPhone 6 you'll get the bounds of an iPhone 6 (750x1334):

`Native Bounds: {{0, 0}, {750, 1334}}`

You can log the `CGRect` returned by the `nativeBounds` property with the `NSStringFromCGRect()` function.

Additionally, there's an awesome guide to iOS screen sizes from the folks at PaintCode: <http://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions>.