Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chrono1081

macrumors G3
Original poster
Jan 26, 2008
8,924
6,642
Isla Nublar
Hi guys,

I have two UIAlertViews that pop up when two different buttons are pressed. One button is a submit button, the other is a clear button. These are the only two popups in the entire app (it's a single page app and only has one view controller).

I have the view controller as the delegate for the pop ups but I'm not sure if this is a good way to do it. Currently I haven't found a way to tell which button called the popup so that I can handle it in the clickedButtonWithIndex method.

Is it a good/bad practice to handle two UIAlertViews in one view controller? How would I tell which button called the alert?

Thank you in advance to anyone that can help.


EDIT: Solved. I learned right after I posted this (figures) about a "tag" property that I can set. Works like a charm!
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.