其中尺寸为@ 2x iPhone 6/5 / 5S的切割设计

时间:2014-11-11 13:01:15

标签: ios objective-c iphone iphone-6-plus

我已经阅读了有关此问题的所有问题,所有网络文章仍然无法以正确的方式获得。 我为iPhone 6+(2208x1242)设计了应用程序,现在我想要剪切的PSD。我需要调整大小以便为iPhone 6/5 / 5S剪裁合适的尺寸吗?

只是无法弄明白,所以请帮帮我..

提前致谢。

2 个答案:

答案 0 :(得分:2)

以下是所有其他iPhone设备分辨率的链接: http://iphoneresolution.com/

您应该只调整背景大小并剪切按钮和所有其他UI元素,如果需要调整元素大小,请注意通过保持宽高比来调整大小。

干杯, 我希望它能帮助你

答案 1 :(得分:0)

这可能会有所帮助。报告的屏幕大小在代码中。实际屏幕尺寸在评论中。

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
    device = @"iPhone Classic"; // Just in case it doesn't make it through the conditionals
    // Classic has a resolution of 480 × 320
    if( (screenSize.height == 480 || screenSize.width == 480) && deviceScale == 1.0f ) {
        device = @"iPhone Classic";
    // Retina has a resolution of 960 × 640
    } else if( (screenSize.height == 480 || screenSize.width == 480) && deviceScale == 2.0f ) {
        device = @"iPhone Retina35";
    // Retina 4" has a resolution of 1136 x 640
    } else if (screenSize.height == 568 || screenSize.width == 568 ) {
        device = @"iPhone Retina4";
    // iPhone 6 has a resolution of 1334 by 750
    } else if (screenSize.height == 667 || screenSize.width == 667 ) {
        device = @"iPhone 6";
    // iPhone 6 Plus has an actual size of 2208 × 1242 and resolution of 1920 by 1080
    // Reported size is 736 x 414
    } else if (screenSize.height == 736 || screenSize.width == 736 ) {
        device = @"iPhone 6 Plus";
        }

} else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
        device = @"iPad Classic"; // Just in case it doesn't make it through the conditionals
        if(deviceScale == 1.0f) {
            device = @"iPad Classic";
        } else if (deviceScale == 2.0f) {
            device = @"iPad Retina";
        }
}