How to react to a UIAlertView

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.

About Jay Versluis

Jay is a medical miracle known as Super Survivor. He runs two YouTube channels, five websites and several podcast feeds. To see what else he's up to, and to support him on his mission to make the world a better place, check out his Patreon Campaign.

Leave a Reply

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