I have two method to appear and disappear UIAlertView
- (void)showAlert {
UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:@"My Alert"
message:@"Do you want to continue?"
delegate:self
cancelButtonTitle:nil
otherButtonTitles:@"No", @"Yes", nil];
[myAlert show];
}
// dismiss uialert
- (void)dismiss:(UIAlertView*)alert {
[alert dismissWithClickedButtonIndex:0 animated:YES];
}
The problem that I have, when I want to call my dismiss method, I don't know how to pass myAlert to dismiss method in order to hide the UIAlertView.
[self dismiss: // how to pas myAlert];