Xcode当我在iphone 5屏幕上运行程序看起来iphone 4

我正在使用Xcode 6并使用Objective-C当我testing程序在iOS 8(iPhone 5)程序运行没有错误,但是当我尝试在iOS 7(iPhone 5)屏幕上testing程序看起来像iPhone 4屏幕。 我可以检测到这样的电话;

#define iPhone6Plus ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone && [UIScreen mainScreen].bounds.size.height == 736) #define iPhone6 ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone && [UIScreen mainScreen].bounds.size.height == 667) #define IS_IPHONE_5 ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone && [UIScreen mainScreen].bounds.size.height == 568) #define IS_IPAD UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad 

也可以检测到这样的操作系统;

 if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_0) { #define IS_IPHONE_5 ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone && [UIScreen mainScreen].bounds.size.height == 568) } 

当我做这个屏幕不缩放在手机上,因为当我在iOS 7手机屏幕上运行像iPhone 4一样检查图像的更多描述。 在这里输入图像说明

正如你可以看到顶部和底部的黑色。我可以如何解决这个问题

在这里输入图像说明

设置iPhone 5启动屏幕。 这将是固定的。

iPhone 5的启动屏幕规格: 640×1136

暂时在photoshop或预览上创build一个空白的屏幕。 您可以稍后更换。