何时使用UIAlertView与UIActionSheet [英] When to use a UIAlertView vs. UIActionSheet
问题描述
有没有UIAlertView比UIActionSheet更好使用的情况?
Are there situations where a UIAlertView is better to use than a UIActionSheet? What are the typical scenarios where you would use one over the other?
我正在编程一个导航栏按钮,在外部应用程序中打开UIWebView,首先,开始编程UIAlertView,然后我认为一个操作表可能更好的这种情况。
I'm programming a navigation bar button to open a UIWebView in an external application, and at first I started programming a UIAlertView, then I thought that an action sheet might be better for this situation.
在不同的情况下,有没有正式的指南?感谢。
Are there any formal guidelines for which to use in different situations? Thanks.
推荐答案
来自Apple的iPhone 人机接口指南:
From Apple's iPhone Human Interface Guidelines:
警报,操作表和模态视图
设计用于传达不同的
事物:
Alerts, action sheets, and modal views are designed to communicate different things:
- 警报向用户提供影响其对应用程序(或设备)使用
的重要信息。
警告通常是意外的,因为
他们通常告诉用户一个
问题或当前
情况的更改,可能需要用户
采取行动。 li>
- 操作表为用户提供了与
当前操作相关的其他选项。用户学习
期望出现一个动作
工作表时,他们点击工具栏按钮
开始一个潜在的
破坏性操作(例如删除
所有最近调用)或
可以以不同方式完成的动作
(例如用户
可以指定多个
目的地之一的发送动作)。 - Modal视图在
当前任务的上下文中提供更广泛的功能,或者提供一种方法来执行与用户工作流程的
直接相关的子任务。
这篇关于何时使用UIAlertView与UIActionSheet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!