I have 3 alert views in my apps.
'wonAlert'
'lostAlert'
'nagAlert'
I implement this to give them actions.
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
This used to work fine, when I had just the 'wonAlert' and 'lostAlert', they had a dismiss and a learn more button that took them to wikipedia,
now I want the nag alert to take them to the app store.
how can I make it so the above method knows which alert view the tap is coming from, or something like that?
Cheers, Sam
Best Answer
It sounds like you've got the UIAlertViews in variables, so I'd use them:
More than one view can have the same tag and you can easily mistype the title or change it and forget to update the delegate method.