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!
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: