What are the button indexes in a three-button UIAlertView

iOS Simulator Screen shot 30 Dec 2013 09.50.43

The cancel button is always index 0, and all other buttons in the array start at index 1 counting up.

For completion, here’s how to create it:

And here’s how to react to it:

This is a delegate method, so the reacting class needs to conform to the UIAlertView Protocol like so:

Leave a Reply

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