2012-08-30 175 views
1

我即将推出一个新的应用程序,并愿意提高图形质量。在我的情况下,图形是徽标和自定义按钮。我不知道这是否会影响Core Plot,但这也是该软件包的一部分。视网膜图形与非视网膜图形管理

有很多关于此的帖子,但仍然有些东西我不完全理解。

我从 “amattn” 读这句话:

It's trivial: 

1.Only include @2x images in your project. 
2.Make sure those images have the @2x suffix. 
The system will automatically downscale for non-retina devices. 

The only exception is if you are doing manual, low level Core Graphics drawing. 
You need to adjust the scale if so. 99.9% though, you don't have to worry about this. 

从这个帖子:Automatic resizing for 'non-retina' image versions

我在关于这个问题是:

1. Should i do the testing on retina simulator only, as if i place a @2 grapic on 
non-retina it will be too big? ...or is there an other way of doing it? 

2. Should i always use a ImageView or is it OK to drag the image on the screen, 
this is the logo i am talking about? 

3. What about custom made buttons with images, how should i do with those? 

4. What is the normal process to manage the different screen sizes, do people 
add images for all displays or using this type of process? 

回答

1
  1. 应该我只在视网膜模拟器上进行测试,就好像我将@ 2 grapic放置在非视频模拟器上一样-retina它会太大? ...还是有其他的 这样做吗?

它并不真正的问题你测试上,因为只要你的非视网膜及视网膜图形是正确命名(图像和图像@ 2X)正确的图像将自动显示该模拟器。

  1. 我就应该总是使用ImageView的还是OK拖动屏幕上的图像,这是我讲的标志?

当你从项目拖放图像上直接在界面生成器视图,你真的不看到这一点,但它已经自动创建和被包含您的下降在图像图像视图。

  1. 如何定制按钮与图像,我应该如何处理这些?
[myButton setImage:[UIImage imageNamed:@"myFileName"]]; 

如在上述代码当引用的UI元素应该使用的图像,你应该总是使用非视网膜FLE名称所示。这是如果iOS检测到设备是视网膜,它可以自动使用@ 2x版本。

  1. 什么是正常的过程来管理不同的屏幕尺寸,人们才会为所有显示器添加图片或使用这种类型的过程?

是,包括多个图像分辨率常见的做法,需要iPhone应用程序(不知道新iPad)以包括视网膜和非视网膜图像。但是不管要求如何,您都应该支持这两种设备解决方案,以保持客户的满意度!

相关问题