iphone:Designing-an-alert

出自UXGuide.net

跳转到: 导航, 搜索

设计警告
Designing an Alert

You can specify the text, the number of buttons, and the button contents in an alert. You can’t customize the width or the background appearance of the alert view itself, or the alignment of the text (it’s center-aligned).

Note: As you read these guidelines, be aware of the following definitions:

  • Title-style capitalization means that every word is capitalized, except articles, coordinating conjunctions, and prepositions of four or fewer letters.
  • Sentence-style capitalization means that the first word is capitalized, and the rest of the words are lowercase, unless they are proper nouns or proper adjectives.

你可以定义文字的内容,按钮的数量,以及按钮上显示的文字,但是你不能定义警告窗口的宽度、背景色以及文字的对齐方式(已经被预定于为居中对齐)

注意: 当你阅读这些规范时,需注意以下定义:

  • 标题式大写:除了冠词、连词、介词(由四个或者更少的字母组成)外的每个单词都大写.
  • 句子式大写:第一个单词大写,其余单词小写(除非是专属名称或者专属形容词).

The alert title (and optional message) should succinctly describe the situation and explain what people can do about it. Ideally, the text you write gives people enough context to understand why the alert has appeared and to decide which button to tap.

警告窗口的标题(警告信息也同样)应该精炼的描述目前的情形并且向用户解释,他们能够做些什么,理想情况下,你写的文字能够给用户足够的上下文信息,去帮助他们理解为何会出现警告,并且接下去应该去点击哪个按钮.

As you compose the required alert title:

当你写警告窗口的标题时:

如果可能,尽可能简短,以便能在一行显示,冗长的让用户不能快速阅读,并且造成文本区域内的滚动

不要只用一两个单词,例如“错误”、“警告”等,这样无法提供有用的信息

使用句子片段,一条简短并且有信息量的描述比一个完整的句子更容易理解

无需避免消极或者否定的词汇。人们可以理解,大部分的警告窗口都是在告诉他们有麻烦了或者警告他们当前的危险情况,因此直接和消极的陈述要比拐弯抹角好的多

尽可能避免使用“你”“你的”“我”,有时,直接指向人们的词语会被曲解甚者被认为是一种侮辱

下列情形使用没有结束标点的标题式大写

标题是句子片段

标题是一个句子,但非疑问句

如果标题由一个疑问句组成,使用有结束标点的句子式大写。一般情况下,如果能够避免增加一条信息的话,可以尽可能的使用疑问句作为警告窗口的标题

如果标题由两个以上句子组成,使用句子片段式大写,并且为每个句子加上结束标点。很少情况下会使用到两条句子作为警告窗口的标题,但是如果能避免再增加一条信息,可以考虑使用

If you provide an optional alert message: 如果你使用可供选择的警告窗口

尽量保持信息简介,以便于在一行或者两行内显示。如果信息过长,文本区将不得不滚动

尽量使用句子片段式大写,警告信息应该是一个完整的句子

Avoid lengthening your alert text with descriptions of which button to tap, such as “Tap View to see the information.” Ideally, the combination of unambiguous alert text and logical button labels gives people enough information to understand the situation and their choices. However, if you must provide detailed guidance, follow these guidelines:

不要描述应该点击哪个按钮而导致文字加长,比如“点击按钮去查看信息”,理想情况下,明确的警告文字和按钮文字,能够告诉用户足够的信息去理解目前的情况并做出正确的选择,但是,如果你必须提供更多的细节指导,请遵循:

使用单词“点击”(而不是“触摸”“触碰”“选择”)来描述动作

不要用引号把标题引起来,但是一定要大写

Be sure to test the appearance of your alert in both orientations. Because the height of an alert is constrained in landscape, it might look different than it does in portrait. It’s recommended that you optimize the length of the alert text so that it looks good (and avoids scrolling) in both orientations.

要在横向和竖向两个方向测试警告窗口。因为警告窗口的高度是在横向方向限制的,这会在竖向上看起来不太一样,推荐的方法是优化文字内容,以便于在两个方向看起来都没有问题(避免滚动)

Prefer a two-button alert. A two-button alert is often the most useful, because it is easiest for people to choose between two alternatives. It is rarely a good idea to display an alert with a single button because such an alert is merely informative; it does not give people any control over the situation. An alert that contains three or more buttons is significantly more complex than a two-button alert, and should be avoided if possible. In fact, if you find that you need to offer people more than two choices, you should consider using an action sheet instead (see “Using Action Sheets” and “Designing an Action Sheet” for more information on this type of view).

推荐使用两个按钮的警告窗口。两个按钮的警告窗口是最有效的,因为它能让人们更容易选择;如果只给用户一个按钮并不是一个好主意,因为这样的警告窗口只能提供信息,用户对当前情况无法作出任何选择和控制;三个或者更多的按钮明显比两个按钮更复杂,应当尽量避免使用。事实上,如果你需要用户做出两个以上的选择,你应该考虑使用操作列表

Use alert button colors appropriately. Alert buttons are colored either dark or light. In an alert with two buttons, the button on the left is always dark-colored and the button on the right is always light-colored. In a one-button alert, the button is always light-colored.

按钮颜色应该适当。 警告按钮有两种颜色:深色和浅色,在有两个按钮的警告窗口中,左边的按钮通常是深色的,右边的按钮通常是浅色的,在只有一个按钮的警告窗口中,按钮颜色通常是浅色的

在包含两个按钮的警告窗口中,如果这个窗口是有风险操作的警告,取消按钮应该是放在右边(浅色)

在包含两个按钮的警告窗口中,如果这个窗口是用户想要开始的一个动作,取消按钮应该放在左边(深色)

Note: A Cancel button may be either light-colored or dark-colored and it may be on the right or the left, depending on whether the alternate choice is destructive. Be sure to properly identify which button is the Cancel button in your code (for more information, see UIAlertView Class Reference).

注意:取消按钮是深色或者浅色都可以,位置在左边在右边也都可以,这主要取决于另外的按钮触发的行为是否具有毁坏性,要正确识别在代码中哪个按钮是取消按钮

所有按钮的标题,使用没有结束标点的标题式大写

和警告文字相连的词语,推荐使用动词或者动词词组,比如“取消”“允许”“回复”或者“忽略”

对于一个简单接受性的选择,推荐使用“OK”,而不是“Yes”或者“No”

尽量避免使用“你”“你的”“我”,按钮标题使用这些字眼,不但模糊而且不敬

个人工具
名字空间
变换
动作
导航
工具箱