How to react to a UIAlertView

- by

An alert view has the clickedButtonAtIndex property. The first clicked button is 0, the next one 1, and so forth. If you conform to the UIAlertViewDelegate protocol you can implement the following method and react to each pressed button accordingly, or simply call a method:

You can also access text fields via the textFieldAtIndex property.



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

Leave a Comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.