简体   繁体   English

iOS8中iPhone应用程序启动图像的大小和命名

[英]Sizes and Naming of Launch Image for iPhone app in iOS8

iOS中用于iPhone应用程序的启动图像的 大小/命名是什么?

Size Conventions 尺寸约定

iPhone3g : 320 x 480 iPhone3g:320 x 480

iPhone4/4s : 640 x 960 iPhone4 / 4s:640 x 960

iPhone5/5s : 640 x 1136 iPhone5 / 5s:640 x 1136

iPhone6 : 750 x 1334 iPhone6:750 x 1334

iPhone 6plus : 1242 x 2208 iPhone 6plus:1242 x 2208

Naming Conventions 命名约定

For developers who don't wan't to use 'Asset Catalogs', they need to give specific names to launch images 对于不想使用“资产目录”的开发人员,他们需要提供特定的名称以启动图像

iPhone3g : 'Default.png' iPhone3g:“ Default.png”

iPhone4/4s : 'Default@2x.png' iPhone4 / 4s:“ Default@2x.png”

iPhone5/5s : 'Default-568h@2x.png' iPhone5 / 5s:“ Default-568h@2x.png”

iPhone6 : 'Default-667h@2x.png' iPhone6:“ Default-667h@2x.png”

iPhone6plus : 'Default-736h@3x.png' iPhone6plus:“ Default-736h@3x.png”

For developers who would use 'Asset Catalogs', they don't need to give specific names to launch images 对于将使用“资产目录”的开发人员,他们无需指定特定名称即可启动图像

Go to ProjectSetting -> General-> Under 'App Icons and Launch Images', select 'Use Asset Catalog' for 'Launch Image Source', and drag-drop the launch images for their OS version's/Orientations 转到ProjectSetting->常规->在“应用程序图标和启动图像”下,为“启动图像源” 选择“使用资产目录 ”,然后将启动图像拖放到其操作系统版本/方向

If you use images.xcassets then you neither need to worry about the naming conventions nor to add those images into your project resource explicitly. 如果使用images.xcassets,则无需担心命名约定,也无需将这些图像显式添加到项目资源中。 Just drag and drop the appropriate size image to the appropriate box and XCode will do the rest. 只需将适当大小的图像拖放到适当的框中,其余的将由XCode完成。

And for image sizes please refers the Apple iOS Human Interface Guidelines 有关图像尺寸,请参阅《 Apple iOS人机界面指南》

在此处输入图片说明

For iPhone 6: 对于iPhone 6:

- 750 x 1334 (@2x) for portrait -纵向750 x 1334(@ 2x)

- 1334 x 750 (@2x) for landscape -横向1334 x 750(@ 2x)

For iPhone 6 Plus: 对于iPhone 6 Plus:

- 1242 x 2208 (@3x) for portrait -纵向1242 x 2208(@ 3x)

- 2208 x 1242 (@3x) for landscape -横向2208 x 1242(@ 3x)

As an alternative, you could consider using a using a launch storyboard or xib instead. 作为替代方案,您可以考虑使用使用启动故事板或xib代替。 Doing it this way only requires one that adapts to all sizes. 以这种方式执行此操作仅需要一种可适应所有大小的方法。

Note, this is works for iOS 8 only. 请注意,这仅适用于iOS 8。 If you use this in an app that also targets iOS 7, it will use the standard launch images when running on iOS 7 devices - but of course you only need 3.5 & 4 inch as the new larger iPhones don't support iOS 7! 如果您在针对iOS 7的应用程序中使用此功能,它将在iOS 7设备上运行时使用标准启动图像-但您当然只需要3.5英寸和4英寸,因为新的更大的iPhone不支持iOS 7!

See the Apple docs for more details. 有关更多详细信息,请参阅Apple文档

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

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