iphone - UIAlertView 操作和取消按钮

标签 iphone objective-c ios uialertview

我一直在研究和分析,我意识到 UIAlertView 中的按钮在按钮和操作之间没有相似性。


Ex. 01
左侧按钮执行主要操作,右侧按钮关闭警报。

Ex. 02
左键关闭警报,右键执行主要操作。


在文档中,“cancelButtonTitle”(右按钮)是取消按钮的标题,但它并没有说明这个按钮是否真的是解除警报的按钮或那个按钮执行主要操作。

好吧,我的问题是:是否有关于按钮的模式或任何人都可以执行任何操作?

最佳答案

来自 Apple HIG:

A button that initiates an action is furthest to the right. This rightmost button, called the action button, confirms the main point of the dialog. The Cancel button is to the left of the action button.

关于iphone - UIAlertView 操作和取消按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12549130/

相关文章:

iOS:通过 segue 传递 boolean 值

ios - UIScrollView 根据后台

iphone - 是否有一种简单的方法来访问 protected 目录中的URL?

iphone - 有没有办法确定何时在UITextField中输入语音文本?

iphone - 重置应用程序的推送通知设置

ios - UIBezierPath:在 iPad 上创建的控制点多于 iPhone?

iphone - AVFoundation 相机预览方向错误

ios - 如何访问其他类中的对象?

android - 使用 PhoneGap Build 的 BackgroundFetch/后台运行应用程序

iOS:在 UIBarButtonItem 和 Button 中附加带有标题的 FontAwesome 图标