ios中的警报视图和操作表



我是I-phone操作系统的初学者。我看过操作表和警报视图。我觉得他们两个的功能是一样的。我可以知道它们之间的确切区别吗。提前感谢

如名称所示。AlertView主要用于提醒用户某事。。比如"我们为您下载了一条新消息!"。

ActionSheet用于让用户指定ACTION。比如"你想做什么?"?编辑、删除、取消

因此,第一个是提醒用户,另一个是要求采取行动。

警报会向人们提供影响他们使用应用程序(或设备)的重要信息

操作表显示与用户启动的任务相关的一组选项

有关详细说明,请参阅苹果的MobileHIG文档。

UIAlertView指南

警报出现的频率很低,这有助于用户接受警报认真地请确保尽量减少应用程序显示的警报数量并确保每一个都提供关键信息和有用信息选择。

避免创建不必要的警报。

一般来说,如果以下情况,警报是不必要的:

Merely increase the visibility of some information, especially information that is related to the standard functioning of your app.
Instead, you should design an eye-catching way to display the information that harmonizes with your app’s style.
Update users on tasks that are progressing normally.
Instead, consider using a progress view or an activity indicator to provide progress-related feedback to users (these methods of

反馈在"进度视图"one_answers"活动指标"中进行了描述)。

Ask for confirmation of user-initiated actions.
To get confirmation for an action the user initiated, even a potentially risky action such as deleting a contact, you should use an

行动单。

Inform users of errors or problems about which they can do nothing.
Although it might be necessary to use an alert to tell users about a critical problem they can’t fix, it’s better to integrate such

如果可能的话,将信息输入UI。例如,与其说用户每次服务器连接失败时,显示最后一次成功连接。

UIActionSheet指南

使用行动表:

Provide alternate ways a task can be completed. An action sheet allows you to provide a range of choices that make sense in the

当前任务的上下文,而不给出这些选择放置在用户界面中。

Get confirmation before completing a potentially dangerous task. An action sheet prompts users to think about the potentially dangerous

他们即将采取的措施的效果,并给他们一些替代方案。这种类型的沟通在基于iOS的设备,因为有时用户毫无意义地点击控件至.

在iPhone上,将动作表背景外观与导航栏和工具栏。如果你的应用程序使用黑色导航栏和工具栏。使用默认的蓝色如果导航栏和工具栏是默认的蓝色,则显示背景颜色

iPhone应用程序中的所有动作表都应具有相同的背景颜色

在iPhone上,包括一个"取消"按钮,以便用户可以轻松安全地使用放弃任务。将"取消"按钮放在操作的底部鼓励用户在做出选择。默认情况下,"取消"按钮的外观与动作表的背景相协调。

在iPad上,选择是显示带有动画的动作表,还是没有动画。

Display an action sheet without animation to provide alternatives related to a task that the user initiates from outside a popover.

如果没有动画,则会出现动作表及其弹出窗口同时当以这种方式显示动作表时popover的箭头指向用户点击的控件或区域启动任务。

Do not include a Cancel button when the action sheet is displayed without animation, because people can tap outside the popover to

在不选择其中一个的情况下关闭操作表替代方案。

Display an action sheet with animation to provide alternatives related to a task that the user initiates from within an open popover.

通过动画,动作表在打开的弹出窗口上向上滑动所容纳之物

An animated action sheet should include a Cancel button, because people need to be able to dismiss the action sheet without closing the

popover。

最新更新