简体   繁体   English

iPhone分辨率排序-iOS

[英]iPhone resolution sorting - iOS

I have read on a lot of sites that for iPhone 6 Plus the image asset needs to be three times as big as the actual image, so it therefor needs to be a @3x image. 我在许多网站上读到,对于iPhone 6 Plus,图像资产需要是实际图像的三倍,因此它需要是@ 3x图像。 And then @2x is for iPhone 6 all the way down to iPhone 4 and then just the original size for iPhone 3GS and below. 然后@ 2x适用于iPhone 6,一直到iPhone 4,然后才是适用于iPhone 3GS及以下版本的原始尺寸。

My main question is that am I right in saying this and if so, what if Apple changes the iPhone's screen size again one day, will they make developer make a @4x image too??? 我的主要问题是我说的对吗?如果是的话,如果苹果有一天再次更改iPhone的屏幕尺寸怎么办,他们也会使开发人员也制作@ 4x图像吗??? I just think its getting a bit out of hand. 我只是认为它有点失控。

What is the best way to sort all this image sizes out? 整理所有这些图像尺寸的最佳方法是什么? Do you just make all the image assets for your app 3 times as big when you are designing them and then make a smaller @2x and @1x version of them?? 在设计应用程序时,是否只是将应用程序的所有图像资源放大三倍,然后再将其缩小为@ 2x和@ 1x版本?

Thanks for your time, Dan. 丹,谢谢您的时间。

Take a look a catalogs they were introduced within Xcode5 I don't think it will go out of hand as if you do it properly you don't really have to do anything else than drag and drop your images and define just the name of the image when using the class method 看一看它们在Xcode5中引入的目录,我认为它不会一发不可收拾,就好像您正确地执行了操作一样,除了拖放图像并定义图像的名称外,您实际上不需要执行任何其他操作。使用class方法时的图像

[UIImage imageNamed:]; [UIImage imageNamed:];

You don't need to define the size iOS will choose the adequate size from your catalog. 您无需定义大小,iOS将从您的目录中选择适当的大小。 you don't even have to define the file type ("jpg, png, etc...") 您甚至不必定义文件类型(“ jpg,png等”)

Take a look to Apple documentation for catalogs I think that's the most organized way to keep your assets. 看一下Apple文档中的目录,我认为这是保存资产最有组织的方法。

https://developer.apple.com/library/ios/recipes/xcode_help-image_catalog-1.0/Recipe.html https://developer.apple.com/library/ios/recipes/xcode_help-image_catalog-1.0/Recipe.html

3gs phone just support till iOS6 the users with iOS6.x is not that high I personally do not support iOS 6 anymore in my apps for iPhone you can check the iOS adoption stats in the following link: 3gs手机仅支持直到iOS6为止,使用iOS6.x的用户还不是很高。我个人不再在我的iPhone应用程序中支持iOS 6,您可以在以下链接中查看iOS的采用情况:

https://mixpanel.com/trends/#report/ios_8/from_date:-29,report_unit:day,to_date:0 https://mixpanel.com/trends/#report/ios_8/from_date:-29,report_unit:da​​y,to_date:0

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

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