jivadevoe/UIAlertView-Blocks — Issue #14: Pragmas to quite the compiler, patch
Author: wmalloc
Created: 2012-02-17 23:49:21+00:00
State: open

diff --git a/UIActionSheet+Blocks.m b/UIActionSheet+Blocks.m
index f155547..6b8c8e5 100644
--- a/UIActionSheet+Blocks.m
+++ b/UIActionSheet+Blocks.m
@@ -69,6 +69,7 @@ static NSString *RI_BUTTON_ASS_KEY = @"com.random-ideas.BUTTONS";

- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex
{
+#pragma unused(actionSheet)
if (buttonIndex != -1)
{
NSArray *buttonsArray = objc_getAssociatedObject(self, RI_BUTTON_ASS_KEY);
diff --git a/UIAlertView+Blocks.m b/UIAlertView+Blocks.m
index 2764467..93522fa 100644
--- a/UIAlertView+Blocks.m
+++ b/UIAlertView+Blocks.m
@@ -60,6 +60,7 @@ static NSString *RI_BUTTON_ASS_KEY = @"com.random-ideas.BUTTONS";

- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
+#pragma unused(alertView)
NSArray *buttonsArray = objc_getAssociatedObject(self, RI_BUTTON_ASS_KEY);
RIButtonItem *item = [buttonsArray objectAtIndex:buttonIndex];
if(item.action)