The block syntax was introduced to iOS 4.0. This class enable you to write the code for showing alert and the call back blocks gathered in one place as bellow,
[MyAlertView alertWithTitle:@"Title" message:"some message"
cancelButtonTitle:@"OK"
clickedBlock:^(UIAlertView *alertView, NSInteger buttonIndex) {
switch (buttonIndex) {
//do something depending on the button index.
}
} cancelBlock:^(UIAlertView *alertView) {
// do something on cancel button
} otherButtonTitles:@"Hoge", nil];