如何根据人机界面指南在iPad上删除确认 [英] How to do delete confirmation on iPad according to the human interface guidelines

查看:108
本文介绍了如何根据人机界面指南在iPad上删除确认的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

阅读 iOS人机界面指南,似乎没有正确的方式让用户在删除前进行确认。在处理UIAlertView和UIActionSheet时,指南列出了3件事:

Reading through the iOS Human Interface Guidelines, it appears that there is no "right" way to have the user confirm before deleting. The Guidelines list 3 things when dealing with UIAlertView and UIActionSheet:


  • 不要使用警报视图来确认用户启动的操作。

  • 不要在操作表上(在iPad上)包含取消按钮。

  • 操作表必须至少有2个按钮。

所以...我需要让用户确认他们想删除一些东西。呈现它们的唯一选择是实际删除事物,或什么都不做(取消)。他们可以选择不做任何操作,只需点击操作表外部即可解散它。但是这只留下了1个按钮用于操作表。你应该怎么做删除确认?

So... I need to have the user confirm that they want to delete something. The only choices to present them with is to actually delete the thing, or do nothing (cancel). They can choose to do nothing by clicking outside the actions sheet, which dismisses it. But this only leaves 1 button for the action sheet. How are you supposed to do a delete confirmation?

在iPhone上,有动作表的模态/动画版本,非常适用于此目的。但iPad完全改变了动作表的呈现方式。文档说,你仍然可以通过动画呈现iPad上的动作表作为模态;但我发现无论动画是YES还是NO,它的外观和行为完全相同。

On the iPhone, there is the modal / animated version of the action sheet which works great for this purpose. But the iPad completely changes the way action sheets are presented. The documentation says that you can still present an action sheet on the iPad as modal by presenting it with animation; but I have found that it looks and acts exactly the same whether animated is YES or NO.

推荐答案

点击UIActionSheet是与取消它一样。而且由于UIActionSheet只是一个小窗口(并且通常指向)调用它的选项,它不会引起用户的注意。因此,在这种情况下假定的直观行为是从UIActionSheet中取出以使其消失。所以这等于取消按钮(根据模糊的文档,为什么你有时不需要另一个按钮)。

Tapping off of the UIActionSheet is the same as canceling it. And since the UIActionSheet is only a smallish window over top of (and usually pointing at) the option that called it, it doesn't own the user's attention. So the assumed intuitive action in that case is taping off of the UIActionSheet to make it go away. So that equals a cancel button (and why you "sometimes" don't need another one, according to the vague documentation).

来自 UIActionSheet文档页面


在iPad上展示活动表时,有时您不应该包含取消按钮。如果仅显示操作表,系统将在不使用动画的情况下在弹出框中显示操作表。由于弹出窗口外的水龙头在不选择项目的情况下关闭操作表,因此这将导致取消工作表的默认方式。因此,包括取消按钮只会引起混淆。但是,如果您有一个现有的弹出框并且正在使用动画在其他内容上显示一个操作表,则取消按钮仍然是合适的。有关更多信息,请参阅iOS人机界面指南。

When presenting an action sheet on an iPad, there are times when you should not include a cancel button. If you are presenting just the action sheet, the system displays the action sheet inside a popover without using an animation. Because taps outside the popover dismiss the action sheet without selecting an item, this results in a default way to cancel the sheet. Including a cancel button would therefore only cause confusion. However, if you have an existing popover and are displaying an action sheet on top of other content using an animation, a cancel button is still appropriate. For more information see iOS Human Interface Guidelines.

如果实现actionSheet:clickedButtonAtIndex:方法,则点击UIActionSheet将返回按钮索引为-1。其他按钮从索引0开始。

If you implement the actionSheet:clickedButtonAtIndex: method, tapping off of the UIActionSheet will return a button index of −1. Other buttons start at an index of 0.

我认为,在某些情况下,Apple指南是不一致或不可能的。但是从文档的语言和我对HIG的阅读中可以看出,如果在实现中没有意义的话,你应该尝试满足有意义的条件并且不要太过分。

I think the takeaway is that the Apple guidelines are inconsistent or impossible in some scenarios. But it seems from the language of the documentation and my reading of the HIG that you should try to satisfy the conditions that make sense and not sweat it too much if it doesn't make sense in your implementation.

这篇关于如何根据人机界面指南在iPad上删除确认的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆