iphone:Designing-an-action-sheet

出自UXGuide.net

跳转到: 导航, 搜索

请帮助我们修订和更新本文的译文部分

本文的译文部分可能是由多个贡献者提供或从不同的渠道收集,未经过最终审阅和整理,请您帮助我们一起修订和更新本文的译文部分。

设计操作列表
Designing an Action Sheet

You choose the background of an action sheet to coordinate with the look of your application, and you can specify the number of buttons and their contents.

你可以为操作列表选择一种配合应用程序外观的背景,并且你可以指定按键的数量跟他们的内容。

Unlike an alert, an action sheet should not need to display a textual message. This is because an action sheet appears as the result of a user action, such as tapping a Delete or Send button, so there should be no need to explain its arrival.

跟警告窗口不同,操作列表不需要显示文本信息。应为操作列表的出现是用户操作之后的结果,如点击“删除”或“发送”按键,所以没有必要解释操作列表的出现。

Action sheets can have two different background appearances. You need to ensure that the background of the action sheets in your application coordinates with the appearance of your application’s toolbars or navigation bars. If your application uses black navigation bars and toolbars, for example, the action sheet background should be translucent black. By default, iPhone OS displays action sheets with a standard blue background, which coordinates with the standard blue toolbars and navigation bars. All action sheets in your application should have the same background color, and that color should coordinate with the color of the navigation bars and toolbars.

操作列表可以拥有两种不同的背景显示。你要确保应用程序中操作列表的背景跟应用程序中工具栏和导航栏中的显示是搭配的。例如,如果应用程序使用的是黑色的导航栏和工具栏,操作列表的背景就应该是半透明的黑色。默认情况下,iPhone操作系统使用和标准蓝色工具栏以及导航栏搭配的标准的蓝色背景来显示操作列表。应用程序中的所有操作列表都应该具有相同的背景颜色,这种背景颜色应该与导航栏以及工具栏的颜色相搭配。

Be sure to display the Cancel button at the bottom of an action sheet. This encourages the user to read through all the alternatives before reaching the Cancel option.

一定要在操作列表的底部显示“取消”按键。这样做会鼓励用户在读到最下边”取消“选项之前阅读其他所有选项。

Figure 7-3 shows an action sheet with the default background appearance and a Cancel button in the recommended location.

图7-3所示的是一个默认背景的操作列表以及“取消”按键的推荐位置。

Figure 7-3  A typical action sheet
图7-3 一个典型的操作列表

ui_threebactionsheet.jpg

If you need to provide a button that performs a potentially destructive action, such as deleting all the items in a user’s shopping list, you should use the red button color. It’s important to display such destructive buttons at the top of the action sheet for two reasons:

如果你要提供一个按键来执行具有潜在危险的操作,像删除所有用户购物列表中的条目,这时候你应该使用红色的按键。在操作列表的顶部显示这种具有危险性的按钮是非常重要的,因为:

越接近操作列表顶部的按键越明显可见。
有时候当用户想要点击“主界面”按键的时候他们会不小心点到屏幕底下。将操作列表有危险的按键放置在远离底部的位置,这样当用户没有点到“主界面”按键而点到屏幕上的时候他们就不大可能会造成不希望看到的结果。

Figure 7-4 shows an action sheet with the translucent black background appearance and both a Cancel and a destructive button in their recommended positions.

图7-4显示了一个黑色半透明背景的操作列表以及“取消”按键和另外一个具有危险性的按键的合适位置。

Figure 7-4  A button that performs a destructive action should be red and located at the top of the action sheet
图7-4 一个执行具有破坏性操作的按键应该是红色的并且定位在操作列表的顶部

ui_blacktransparentdialog.jpg

You can display several buttons in an action sheet, as long as you make sure each button is easily distinguished from the others. Figure 7-5 shows an action sheet with a background that matches the standard blue toolbar and that provides three alternatives in addition to Cancel.

你可以在操作列表中显示若干按键,只要确保每个按键和其他的相比很容易辨认。图7-5所示的是一个背景与标准蓝色工具栏相搭配的操作列表并提供了三个备选选项以及“取消”按键。

Figure 7-5  An action sheet with four buttons
图7-5 拥有4个按键的操作列表

ui_toolbarmatchdialogblue.jpg

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