UIAlertView:取消按钮应该在哪里?

发布于 2024-11-18 07:30:41 字数 102 浏览 3 评论 0 原文

iOS系统中的警报视图:

  • 安装App OTA:取消按钮在左侧。
  • 删除应用程序:取消按钮位于右侧。

取消按钮应该在哪里?

The alert views in iOS system:

  • Install App OTA: the cancel button is on the LEFT.
  • Delete an App: the cancel button is on the RIGHT.

Where the cancel button should be?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

十雾 2024-11-25 07:30:41

来自人机界面指南

在提出潜在风险操作的两按钮警报中,取消操作的按钮应位于右侧(浅色)。

在提出人们可能想要的良性操作的两按钮警报中,取消操作的按钮应位于左侧(且为深色)。

From Human Interface Guideline:

In a two-button alert that proposes a potentially risky action, the button that cancels the action should be on the right (and light-colored).

In a two-button alert that proposes a benign action that people are likely to want, the button that cancels the action should be on the left (and dark-colored).

天赋异禀 2024-11-25 07:30:41

根据苹果公司
将按钮放置在人们期望的位置。一般来说,人们最有可能点击的按钮应该位于右侧。取消按钮应始终位于左侧。 https://developer.apple.com/design/ human -界面指南/ios/views/alerts/

As per Apple
Place buttons where people expect them. In general, buttons people are most likely to tap should be on the right. Cancel buttons should always be on the left. https://developer.apple.com/design/human-interface-guidelines/ios/views/alerts/

九局 2024-11-25 07:30:41

如果您在初始化程序中设置取消按钮的文本,iOS 会为您处理这个问题。

作为 人机界面指南说:

在提出潜在风险操作的两按钮警报中,取消操作的按钮应位于右侧(浅色)。

尽管在实践中,您可能会使用通用标签以外的其他内容来标记按钮。在许多情况下,(我有是/否)警报。正如 Apple 的示例所示,HIG 的这一部分不会影响您的应用程序。

If you set the text for the cancel button in the initializer, iOS will take care of this for you.

As the Human Interface Guidelines say:

In a two-button alert that proposes a potentially risky action, the button that cancels the action should be on the right (and light-colored).

Although, in practice, you may be labeling your buttons with something other than the generic label. (I have Yes/No) alerts in many circumstances. As your example from Apple shows, this part of the HIG won't be a deal breaker for your app.

深者入戏 2024-11-25 07:30:41

中的定义略有更新(没有深浅色参考):

  1. 当最有可能的按钮执行非破坏性操作时,它应该位于右侧两键警报。取消此操作的按钮应该位于左侧。
  2. 当最有可能的按钮执行破坏性操作时,它应该位于两按钮警报的左侧。取消此操作的按钮应该位于右侧。

The definition in was slightly updated (no dark-light colored references):

  1. When the most likely button performs a nondestructive action, it should be on the right in a two-button alert. The button that cancels this action should be on the left.
  2. When the most likely button performs a destructive action, it should be on the left in a two-button alert. The button that cancels this action should be on the right.
菊凝晚露 2024-11-25 07:30:41
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Title" message:@"Message" delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:@"Continue"];

在这种情况下,默认情况下,取消按钮将位于屏幕左侧。

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Title" message:@"Message" delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:@"Continue"];

The cancel button will be on the left side of the screen in this case which is the default case.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文