How to react to multiple UIAlertViews

If your class creates more than one UIAlertView, then you need a way to react to each of those accordingly. Problem is, you may only have one delegate that listens to all alerts at any given time.

You could of course create a separate class for each alert view, but that’s a bit overkill. Instead, the UIView’s tag property comes in handy with which you can identify a view at runtime (and UIAlertView inherits from UIView).