Permalink
Browse files

AlertView Blocks done

  • Loading branch information...
1 parent c31b460 commit 2de79640521648420b7bfda4170752d912f58811 @MugunthKumar committed Mar 21, 2011
Showing with 4 additions and 4 deletions.
  1. +1 −1 UIAlertViewCategory/UIAlertView+Block.h
  2. +3 −3 UIAlertViewCategory/UIAlertView+Block.m
@@ -27,7 +27,7 @@ typedef void (^CancelBlock)();
onCancel:(CancelBlock) cancelled
message:(NSString*) message
cancelButtonTitle:(NSString*) cancelButtonTitle
- otherButtonTitles:(NSString*) otherButtons, ... NS_REQUIRES_NIL_TERMINATION;
+ otherButtonTitles:(NSString*) otherButtons, va_list(others);
@end
@@ -18,7 +18,7 @@ + (void) alertViewWithTitle:(NSString*) title
onCancel:(CancelBlock) cancelled
message:(NSString*) message
cancelButtonTitle:(NSString*) cancelButtonTitle
- otherButtonTitles:(NSString*) otherButtons, ...
+ otherButtonTitles:(NSString*) firstButton, va_list(argumentList)
{
[_cancelBlock release];
@@ -31,7 +31,7 @@ + (void) alertViewWithTitle:(NSString*) title
message:message
delegate:[self class]
cancelButtonTitle:cancelButtonTitle
- otherButtonTitles:otherButtons, nil];
+ otherButtonTitles:firstButton, argumentList, nil];
[alert show];
[alert release];
}
@@ -64,7 +64,7 @@ + (void) alertViewWithTitle:(NSString*) title
+ (void)alertView:(UIAlertView*) alertView didDismissWithButtonIndex:(NSInteger) buttonIndex
{
- if(buttonIndex != [alertView cancelButtonIndex])
+ if(buttonIndex == [alertView cancelButtonIndex])
{
_cancelBlock();
[_cancelBlock release];

0 comments on commit 2de7964

Please sign in to comment.