I have a few questions about screen resolution, that I'm not clear on. These questions assume they my app will be running on iOS 4.0 and up, and on either iPhone 3GS or iPhone 4.
我有几个关于屏幕分辨率的问题,我不太清楚。这些问题假设我的应用会运行在iOS 4.0或以上版本,iPhone 3GS或iPhone 4上。
-
Should the size of the splash image (default.png) be (960x640) or (480x320)?
飞溅图像(default.png)的大小是(960x640)还是(480x320)?
-
Should the size of the app icon (Icon.png) be (57x57) or (114x114)?
app图标的大小(Icon.png)是(57x57)还是(114x114)?
-
What about other graphics that I may use in my app, such a graphic that represents a button? Should I always create these images for the higher resolution, and have the app scale them down? In other words, if I want a button image to be displayed on the 3GS that is 200x40 - should I create the image at 400x80, so that iPhone 4 can take advantage of it?
我可以在我的应用程序中使用的其他图形呢,比如一个代表按钮的图形?我是否应该为更高的分辨率创建这些图像,并让应用缩小它们?换句话说,如果我想要一个按钮图像显示在3GS上,也就是200x40——我应该在400x80上创建这个图像,以便iPhone 4可以利用它吗?
Thanks!
谢谢!
2 个解决方案
#1
2
A good guide to this can be found here: http://mobile.tutsplus.com/tutorials/iphone/preparing-your-iphone-app-for-higher-resolutions/
这里可以找到一个很好的指南:http://mobile.tutsplus.com/tutorials/iphone/prepareyour-iphone -app-for-更高分辨率。
In general you just create 2 sets of images. Your original and then a new one twice as big with @2x in the name. So for image.png at size 32x32 you would have one that is twice the resolution called image@2x.png at size 64x64. In your app just always use the image.png in Interface Builder and when loading in code.
一般来说,你只需要创建两组图像。你原来的,然后是一个新的两倍大的@2x的名字。所以对于形象。在32x32大小的png中,有一个分辨率是image@2x的两倍。png在64 x64大小。在你的应用中,总是使用图像。在接口构建器和加载代码时使用png。
There is no need to detect the device. These images will automatically be picked up by the OS and subbed in as necessary.
不需要检测设备。这些图像将自动被操作系统拾取,并在必要的时候被嵌入。
- Provide both sizes (960x640 & 480x320) for the splash image using the @2x method described above
- 使用上面描述的@2x方法为splash图像提供大小(960x640和480x320)
- Provide both icons (57x57 & 114x114) using the @2x method
- 使用@2x方法提供这两个图标(57x57和114x114)
- For our apps we use a combination of the @2x images and just Scaling the large images. (More information on this can be found in the above article) We use the @2x images for bar buttons, icons, etc. But for UIImageViews we often just use the Scaling. There can be a performance hit for doing this, but for most apps I'd say this is negligible. The savings in file size sometimes make scaling the only option.
- 对于我们的应用,我们使用的是@2x图像的组合,只是放大了大的图像。(关于这个的更多信息可以在上面的文章中找到)我们使用@2x图片作为工具条按钮、图标等等。但是对于UIImageViews,我们通常只使用缩放。这样做可能会对性能造成冲击,但对于大多数应用程序来说,我认为这是可以忽略不计的。文件大小的节省有时使扩展成为惟一的选择。
Related Questions:
相关问题:
- Retina/non-retina images in UIImageView
- 视网膜在UIImageView / non-retina图片
- Making an app Retina Display friendly
- 让一个应用程序视网膜显示友好
#2
1
You need to provide both if you want them to look nice. For example,
如果你想让它们看起来漂亮,你需要提供这两种。例如,
Default.png -> (480x320)
违约。png - >(480 x320)
Amd
Amd
Default@2x.png -> (960x640)
Default@2x。png - >(960 x640)
#1
2
A good guide to this can be found here: http://mobile.tutsplus.com/tutorials/iphone/preparing-your-iphone-app-for-higher-resolutions/
这里可以找到一个很好的指南:http://mobile.tutsplus.com/tutorials/iphone/prepareyour-iphone -app-for-更高分辨率。
In general you just create 2 sets of images. Your original and then a new one twice as big with @2x in the name. So for image.png at size 32x32 you would have one that is twice the resolution called image@2x.png at size 64x64. In your app just always use the image.png in Interface Builder and when loading in code.
一般来说,你只需要创建两组图像。你原来的,然后是一个新的两倍大的@2x的名字。所以对于形象。在32x32大小的png中,有一个分辨率是image@2x的两倍。png在64 x64大小。在你的应用中,总是使用图像。在接口构建器和加载代码时使用png。
There is no need to detect the device. These images will automatically be picked up by the OS and subbed in as necessary.
不需要检测设备。这些图像将自动被操作系统拾取,并在必要的时候被嵌入。
- Provide both sizes (960x640 & 480x320) for the splash image using the @2x method described above
- 使用上面描述的@2x方法为splash图像提供大小(960x640和480x320)
- Provide both icons (57x57 & 114x114) using the @2x method
- 使用@2x方法提供这两个图标(57x57和114x114)
- For our apps we use a combination of the @2x images and just Scaling the large images. (More information on this can be found in the above article) We use the @2x images for bar buttons, icons, etc. But for UIImageViews we often just use the Scaling. There can be a performance hit for doing this, but for most apps I'd say this is negligible. The savings in file size sometimes make scaling the only option.
- 对于我们的应用,我们使用的是@2x图像的组合,只是放大了大的图像。(关于这个的更多信息可以在上面的文章中找到)我们使用@2x图片作为工具条按钮、图标等等。但是对于UIImageViews,我们通常只使用缩放。这样做可能会对性能造成冲击,但对于大多数应用程序来说,我认为这是可以忽略不计的。文件大小的节省有时使扩展成为惟一的选择。
Related Questions:
相关问题:
- Retina/non-retina images in UIImageView
- 视网膜在UIImageView / non-retina图片
- Making an app Retina Display friendly
- 让一个应用程序视网膜显示友好
#2
1
You need to provide both if you want them to look nice. For example,
如果你想让它们看起来漂亮,你需要提供这两种。例如,
Default.png -> (480x320)
违约。png - >(480 x320)
Amd
Amd
Default@2x.png -> (960x640)
Default@2x。png - >(960 x640)