Hide UIAlertView programmatically?

孤人 提交于 2019-12-05 08:26:14

问题


Is there a way to hide UIAlertView programmatically? Actually I have added a UITextField in UIAlertView and I want to perform the same operation as on "Ok" button press when a user hits the keyboard return key.


回答1:


Call

[theAlertView dismissWithClickedButtonIndex:0 animated:YES];

when you handle the return key.



来源:https://stackoverflow.com/questions/3853887/hide-uialertview-programmatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!