当我在iphone 5屏幕上运行程序时,xcode看起来像iphone 4 [英] xcode when i run program on iphone 5 screen looks iphone 4

查看:107
本文介绍了当我在iphone 5屏幕上运行程序时,xcode看起来像iphone 4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Xcode 6并使用objective-c当我在iOS 8(iPhone 5)程序上测试程序时没有错误但是当我尝试在iOS 7(iPhone 5)屏幕上测试程序时看起来像iPhone 4屏幕。我可以检测到这样的手机;

I'm using Xcode 6 and use objective-c when i test program on iOS 8 (iPhone 5) program run without error but when i try to test program on iOS 7 (iPhone 5) screen look like iPhone 4 screen. I can detect phone like this;

#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

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

and also i can detect operating system like this;

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一样运行检查图像以获取更多描述。

When i do this screen not scale on phone because when i run on iOS 7 phone screen run like iPhone 4 check image for more description.

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

As you can see top and bottom black.How can i fix this problem

推荐答案

设置iPhone 5启动画面。它将被修复。

Set an iPhone 5 launch screen. It will be fixed.

iPhone 5发布屏幕规格: 640x1136

iPhone 5 launch screen spec: 640x1136

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

For the time being create a blank screen on photoshop or preview. You can replace it later.

这篇关于当我在iphone 5屏幕上运行程序时,xcode看起来像iphone 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆