I have an issue with my code, I have two blocks of code of UIAlertViews one with cancel and ok button, and the other to make a UIImagePicker
-(IBAction)publi
A couple ways.
1)
See how the delegate method is called?
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
From the alertView
parameter, you can tell which alert did the calling (if you set cargaImagen and publicaPeticion's alertviews to separate instance variables).
2)
Another (and probably easier) thing you could do is to set a tag
property on your alertView.
In your 'cargaImagen' method and right after you create the UIAlert, set the tag to 1 via alert.tag = 1;
.
Then, in your alertView:clickedButtonAtIndex:
delegate method, when alertView.tag == 1
, you'll know it comes from cargaImagen and if it's 2 (or zero), you know it comes from publicaPeticion.