Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

AlertView Blocks done

  • Loading branch information...
commit 2de79640521648420b7bfda4170752d912f58811 1 parent c31b460
@MugunthKumar authored
View
2  UIAlertViewCategory/UIAlertView+Block.h
@@ -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
View
6 UIAlertViewCategory/UIAlertView+Block.m
@@ -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];
Please sign in to comment.
Something went wrong with that request. Please try again.