Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ARC

  • Loading branch information...
commit 1eecd4a9cb20f576d9e63c3c33dd35cae6f506c3 1 parent 8db99dc
@jivadevoe authored
Showing with 8 additions and 8 deletions.
  1. +4 −4 UIActionSheet+Blocks.m
  2. +4 −4 UIAlertView+Blocks.m
View
8 UIActionSheet+Blocks.m
@@ -50,7 +50,7 @@ -(id)initWithTitle:(NSString *)inTitle cancelButtonItem:(RIButtonItem *)inCancel
[self setCancelButtonIndex:cancelIndex];
}
- objc_setAssociatedObject(self, RI_BUTTON_ASS_KEY, buttonsArray, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+ objc_setAssociatedObject(self, (__bridge void *)RI_BUTTON_ASS_KEY, buttonsArray, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
[self retain]; // keep yourself around!
}
@@ -59,7 +59,7 @@ -(id)initWithTitle:(NSString *)inTitle cancelButtonItem:(RIButtonItem *)inCancel
- (void)addButtonItem:(RIButtonItem *)item
{
- NSMutableArray *buttonsArray = objc_getAssociatedObject(self, RI_BUTTON_ASS_KEY);
+ NSMutableArray *buttonsArray = objc_getAssociatedObject(self, (__bridge void *)RI_BUTTON_ASS_KEY);
[self addButtonWithTitle:item.label];
[buttonsArray addObject:item];
@@ -68,11 +68,11 @@ - (void)addButtonItem:(RIButtonItem *)item
- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex
{
- NSArray *buttonsArray = objc_getAssociatedObject(self, RI_BUTTON_ASS_KEY);
+ NSArray *buttonsArray = objc_getAssociatedObject(self, (__bridge void *)RI_BUTTON_ASS_KEY);
RIButtonItem *item = [buttonsArray objectAtIndex:buttonIndex];
if(item.action)
item.action();
- objc_setAssociatedObject(self, RI_BUTTON_ASS_KEY, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+ objc_setAssociatedObject(self, (__bridge void *)RI_BUTTON_ASS_KEY, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
[self release]; // and release yourself!
}
View
8 UIAlertView+Blocks.m
@@ -40,7 +40,7 @@ -(id)initWithTitle:(NSString *)inTitle message:(NSString *)inMessage cancelButto
if(inCancelButtonItem)
[buttonsArray insertObject:inCancelButtonItem atIndex:0];
- objc_setAssociatedObject(self, RI_BUTTON_ASS_KEY, buttonsArray, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+ objc_setAssociatedObject(self, (__bridge void *)RI_BUTTON_ASS_KEY, buttonsArray, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
[self setDelegate:self];
[self retain]; // keep yourself around!
@@ -50,7 +50,7 @@ -(id)initWithTitle:(NSString *)inTitle message:(NSString *)inMessage cancelButto
- (void)addButtonItem:(RIButtonItem *)item
{
- NSMutableArray *buttonsArray = objc_getAssociatedObject(self, RI_BUTTON_ASS_KEY);
+ NSMutableArray *buttonsArray = objc_getAssociatedObject(self, (__bridge void *)RI_BUTTON_ASS_KEY);
[self addButtonWithTitle:item.label];
[buttonsArray addObject:item];
@@ -59,11 +59,11 @@ - (void)addButtonItem:(RIButtonItem *)item
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
- NSArray *buttonsArray = objc_getAssociatedObject(self, RI_BUTTON_ASS_KEY);
+ NSArray *buttonsArray = objc_getAssociatedObject(self, (__bridge void *)RI_BUTTON_ASS_KEY);
RIButtonItem *item = [buttonsArray objectAtIndex:buttonIndex];
if(item.action)
item.action();
- objc_setAssociatedObject(self, RI_BUTTON_ASS_KEY, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+ objc_setAssociatedObject(self, (__bridge void *)RI_BUTTON_ASS_KEY, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
[self release]; // and release yourself!
}

0 comments on commit 1eecd4a

Please sign in to comment.
Something went wrong with that request. Please try again.