iPad Retina显示后缀

Baz*_*207 21 ipad ios retina-display

我希望将iPad视网膜(疯狂!)质量图像放入我的应用程序中,以便在16th Martch上推出新iPad.但是,我无法在文档中的任何位置找到我的文件名的正确后缀!

我使用@ 2x后缀用于iPhone和iPod视网膜显示屏.如果有其他人知道它是什么/将是什么iPad,甚至更多,可以告诉我这个官方文件的链接,我真的很感激.

谢谢!:-D

额外:

以为我只是留下了一些代码,我已经开始使用我的iPhone @ 2x图像用于iPad非视网膜图像(因为我的大多数@ 2x~iphone和~ipad图像是相同的,重复只是一个浪费空间).

+ (UIImage*)imageNamedSmart:(NSString*)name
{
    UIImage *returnImage = [UIImage imageNamed:[NSString stringWithFormat:@"%@", name]];

    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
    {
        if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] && [[UIScreen mainScreen] scale] == 2)
        {
            // iPad Scale 2  i.e. 3rd Gen iPad
        }
        else
        {
            // iPad Scale 1  i.e. 1st and 2nd Gen iPad
            return [UIImage imageNamed:[NSString stringWithFormat:@"%@@2x", name]];
        }
    }
    return returnImage;
 }
Run Code Online (Sandbox Code Playgroud)

这意味着而不是调用:
[UIImage imageNamed:@"imageName"]

你打电话:
[self imageNamedSmart:@"imageName"]

希望这能帮到别人一点.:-D

(我通过护目镜找到了这个想法,但我找不到要链接的原始网站,所以无论你是谁,都要感谢你.)

thv*_*kel 38

您必须附加@2x~ipad到图像的名称才能支持视网膜图形.