简体   繁体   English

如何为iPhone 6,6+屏幕分辨率开发或迁移应用程序?

[英]How to develop or migrate apps for iPhone 6,6+ screen resolution?

The new iPhone 6,6+ display has a new resolution. 新的iPhone 6,6 +显示器有一个新的分辨率。

What is required to develop new or transition already existing applications to the new screen size? 开发新的或已经过渡的现有应用程序到新屏幕尺寸需要什么?

What should we keep in mind to make applications "universal" for both the older displays and the new widescreen aspect ratio? 我们应该记住什么使应用程序对于旧显示器和新的宽屏宽高比“通用”?

I use the following code to determine what device is running (it's a little bit quick and dirty but it does the trick) 我使用以下代码来确定正在运行的设备(它有点快速和脏,但它可以做到这一点)

if( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone ){

    CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
    CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;
    if( screenHeight < screenWidth ){
        screenHeight = screenWidth;
    }

    if( screenHeight > 480 && screenHeight < 667 ){
        DLog(@"iPhone 5/5s");
    } else if ( screenHeight > 480 && screenHeight < 736 ){
        DLog(@"iPhone 6");
    } else if ( screenHeight > 480 ){
        DLog(@"iPhone 6 Plus");
    } else {
        DLog(@"iPhone 4/4s");
    }
}

You might want to take a look at this link which I find interesting in regards to screen sizes etc.; 你可能想看一下我觉得有关屏幕尺寸等的链接; http://aten.co/2014/09/12/designing-from-iphone-5-to-iphone-6-iphone-6-more-than-i-bargained-for/ http://aten.co/2014/09/12/designing-from-iphone-5-to-iphone-6-iphone-6-more-than-i-bargained-for/

According to September Keynote 2014, while launching iPhone 6 they mentioned all your existing apps will work fine on iPhone 6 and Plus without any change. 根据2014年9月主题演讲,在推出iPhone 6时,他们提到所有现有的应用程序都可以在iPhone 6和Plus上正常运行而不做任何改动。 They will use @2x resolution. 他们将使用@ 2x分辨率。

Still if you take benefit of BIG Screen, you can redesign/upgrade. 如果您从BIG Screen获益,您仍可以重新设计/升级。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM