BlockAlertView
BlockAlertView
is a subclass of UIAlertView
with a completion block instead of assign a delegate.
Usage
BlockAlertView *alert = [[BlockAlertView alloc]initWithTitle:@"Hey!"
message:@"Hello World"
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Ok", nil];
[alert showWithCompletionBlock:^(UIAlertView *alertView, NSInteger buttonIndex) {
//do somthing here...
}];
Credits
Web: mcmurrich.fr
Twitter: @ben_mcm
Facebook: facebook.com/benjamin.mcmurrich