How can I cancel a UIAlertView programmatically?
This is the code that I use to show the UIAlertView
UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle:@"Save Background" message:@"Downloading..." delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil, nil];
CGAffineTransform myTransform = CGAffineTransformMakeTranslation(0.0, 70.0);
[myAlertView setTransform:myTransform];
[myAlertView show];
Try to use
dismissWithClickedButtonIndex:like this:Here is the code to use: