简体   繁体   English

iPhone 3,iPhone 4和iPad的特定资源

[英]iPhone 3, iPhone 4 and iPad specific resources

iPhone<4 (<3, 3g, 3gs), iPhone 4 and iPad all have different screen resolution. iPhone <4(<3、3g,3gs),iPhone 4和iPad的屏幕分辨率均不同。 I want to make my iOS application graphics to be perfect quality to all of these devices. 我想使我的iOS应用程序图形对所有这些设备都具有完美的质量。 In other words, I want to have unique graphics for iPhone <4, iPhone 4 and iPad. 换句话说,我想为iPhone <4,iPhone 4和iPad提供独特的图形。

I know I can in runtime check which device we are using but could I do this anyway at build time? 我知道我可以在运行时检查我们正在使用的设备,但是在构建时仍可以执行此操作吗? In other words, can I make an application to AppStore that is specific to iPhone's below version 4, and other version of the application for iPhone 4, and another version for iPad? 换句话说,我可以为AppStore制作一个特定于iPhone低于版本4的应用程序,以及另一个适用于iPhone 4的应用程序版本,以及适用于iPad的另一个版本的应用程序吗? So that all of these applications are named the same, and are actually the same application. 这样所有这些应用程序都被命名为相同的,并且实际上是相同的应用程序。 But they contain only the device specific graphics (this way the application's size is smallest as possible). 但是它们仅包含特定于设备的图形(通过这种方式,应用程序的大小尽可能小)。

Or do I need to submit one application to AppStore including all of the different graphics? 还是我需要提交一个包含所有不同图形的应用程序到AppStore? So that even the iphone3 version contains iPad graphics? 这样,即使iphone3版本也包含iPad图形?

You can just include multiple versions of your graphics. 您可以只包含图形的多个版本。 You should have the iPhone < 4 versions named myImage.png and the retina display versions named myImage@2x.png . 你应该有iPhone <命名4个版本myImage.png并定名为Retina显示屏的版本myImage@2x.png The correct image will be used automatically for the appropriate device. 正确的图像将自动用于相应的设备。

With the xib files, you can put a suffix -iPhone and -iPad to distinguish them. 使用xib文件,可以放置后缀-iPhone-iPad来区分它们。

No, you can only submit one application per name to the app store. 不可以,每个名称只能向应用商店提交一个应用。 If you submit a different application build it will replace the previous one. 如果您提交其他应用程序版本,它将替换之前的版本。 You need to create a Universal application , and name your resources (images, nibs) with device idioms (basically appending -iPad, -iPhone) to them. 您需要创建一个通用应用程序 ,并使用设备惯用语(基本上在-iPad,-iPhone后面)命名资源(图像,笔尖)。

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

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