【发布时间】:2011-05-26 07:04:10
【问题描述】:
我注意到,当我从 iPhone 主屏幕删除应用程序时,出现的警报视图左侧显示删除按钮,右侧显示取消按钮。但是,当我使用 UIAlertView 在我的应用程序中构建删除功能时,按钮似乎只显示左侧的取消和右侧的删除。
我希望我的应用与操作系统保持一致,但我不知道如何让“取消”按钮首先出现。有人知道吗?
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Delete Song"
message:@"Are you sure you want to delete this song? This will permanently remove it from your database."
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Delete", nil];
我尝试设置 alert.cancelButtonIndex = 1,但没有效果。
【问题讨论】:
标签: iphone ios ios4 uialertview hig