【发布时间】:2010-10-04 09:08:07
【问题描述】:
有没有办法以编程方式隐藏 UIAlertView?实际上,我在 UIAlertView 中添加了一个 UITextField,我想在用户按下键盘返回键时执行与“确定”按钮相同的操作。
【问题讨论】:
标签: iphone uialertview
有没有办法以编程方式隐藏 UIAlertView?实际上,我在 UIAlertView 中添加了一个 UITextField,我想在用户按下键盘返回键时执行与“确定”按钮相同的操作。
【问题讨论】:
标签: iphone uialertview
打电话
[theAlertView dismissWithClickedButtonIndex:0 animated:YES];
当你处理返回键时。
【讨论】:
[theAlertView dismissWithClickedButtonIndex: theAlertView.cancelButtonIndex animated:YES]; 或[theAlertView dismissWithClickedButtonIndex: theAlertView.firstOtherButtonIndex animated:YES]; 来点击第一个不取消按钮。