alert.alertController = [UIAlertController showAlertInViewController:viewController
withTitle:title message:message
cancelButtonTitle:cancelButtonTitle
destructiveButtonTitle:destructiveButtonTitle
otherButtonTitles:otherButtonTitles
tapBlock:^(UIAlertController *controller, UIAlertAction *action, NSInteger buttonIndex){
if (tapBlock) {
//the var ‘weakAlert’ is nil
tapBlock(alert, buttonIndex);
alert = nil;
}
}];
i think you can do this:
