ios - UIAlertView 上的按钮

标签 ios uialertview

我有一个应用程序,我想让用户在其中做出 1 - 4 的判断。我正在使用 UIAlertView:

UIAlertView *alert = [[UIAlertView alloc]initWithTitle: @"Judgment" message:@"Please choose your overall judgement." delegate: self cancelButtonTitle:nil otherButtonTitles:@"1",  @"2", @"3", @"4", nil];

虽然它有效,但 View 看起来像下图所示,数字 4 通常位于“取消”按钮所在的位置。有更好的方法吗?

enter image description here

最佳答案

您始终可以通过子类化来修改警报 View 。这不是世界上最简单的事情,但我不知道还有其他方法可以完成您想要做的事情。

此链接显示了如何使警报 View 看起来像您想要的那样。 http://mobile.tutsplus.com/tutorials/iphone/ios-sdk-uialertview-custom-graphics/

关于ios - UIAlertView 上的按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21002702/

相关文章:

ios - 将 unsigned long 转换为具有 2 精度十进制值的 float

ios - 在 while 循环中快速保存到 Parse

ios - 禁用安全区域布局指南

iphone - 如何阻止键盘在 iOS 上阻止外部通知的关闭按钮?

ios - UIAlertView 委托(delegate)给另一个类

objective-c - 仍在解除警报

ios - NSURLSession 内存泄漏

ios - iOS IAP问题-用户必须确认信用卡时,iOS仍保留在App Store中

iphone - iPhone 中带有两个按钮的 UIAlertView

ios7 - iOS 7 中显示 UIAlertView 时出现旋转问题