Why doesn't dismissWithClickedButtonIndex ever call clickedButtonAtIndex?

前端 未结 4 1295
梦谈多话
梦谈多话 2021-01-04 08:35

http://iphonedevelopment.blogspot.com/2009/02/alert-view-with-prompt.html

I\'m using that code to get my iPhone app to display an alertView with an included UITextFi

4条回答
  •  被撕碎了的回忆
    2021-01-04 09:15

    Since this is an old question you've probably figured it out by now, but I was incredibly frustrated with this and couldn't find any help from Google, so for anyone who comes across this in the future: when you call dismissWithClickedbuttonIndex, the method that gets called is alertView:didDismissWithButtonIndex, not alertView:clickedButtonAtIndex. It behaves exactly the same way, and I can't figure out why they'd be two separate methods for what seems to be the same action, but there it is.

提交回复
热议问题