I have two UIAlertViews with ok/cancel buttons.
I catch the user response by:
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
The question I’m having is, which alertView is currently open?
I have different actions to do when clicking ok/cancel on each one…
You have several options:
Use ivars. When creating the alert view:
And in the delegate method:
Use the
tagproperty ofUIView:Subclass
UIAlertViewand add auserInfoproperty. This way you can add an identifier to your alert views.