I\'m pretty new to objective C and I\'m just trying to figure out if I can use a block or a selector as the UIAlertViewDelegate argument for UIAlertView - and which is more
I had to edit the calling example a bit to stop complier error. Just a small tweak and xcode was happy.
UIAlertViewBlock *alert = [[UIAlertViewBlock alloc] initWithTitle:@"hi"
message:@"hi there"
completion:^(BOOL canceled,NSInteger buttonIndex) {
NSLog(@"canceled=%d", canceled);
NSLog(@"pressed=%d", buttonIndex);
}
cancelButtonTitle:@"cancel"
otherButtonTitles:@"ok", nil];
[alert show];