Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added userInfo property, and NS_BLOCKS_AVAILABLE flagss

  • Loading branch information...
commit ec4d1178b178fa8eb3c0e1f04ee6d7f8b5614076 1 parent a25b590
@coryalder coryalder authored
Showing with 13 additions and 0 deletions.
  1. +10 −0 Classes/ZIStoreButton.h
  2. +3 −0  Classes/ZIStoreButton.m
View
10 Classes/ZIStoreButton.h
@@ -27,18 +27,28 @@
#define ZI_BUY_NOW_TITLE @"Buy Now"
#define ZI_MAX_WIDTH 120.0f
+
#define ZI_PADDING 10.0f
+#if NS_BLOCKS_AVAILABLE
typedef void (^ActionBlock)();
+#endif
@interface ZIStoreButton : UIButton
{
CAGradientLayer *innerLayer3;
BOOL isBlued;
+#if NS_BLOCKS_AVAILABLE
ActionBlock _actionBlock;
+#endif
+ id userInfo;
}
+@property (nonatomic, retain) id userInfo;
+
+#if NS_BLOCKS_AVAILABLE
-(void)setBuyBlock:(ActionBlock)action;
+#endif
@end
View
3  Classes/ZIStoreButton.m
@@ -28,6 +28,8 @@
@implementation ZIStoreButton
+@synthesize userInfo;
+
-(void)setBuyBlock:(ActionBlock) action {
_actionBlock = Block_copy(action);
}
@@ -178,6 +180,7 @@ - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag {
- (void)dealloc {
Block_release(_actionBlock);
+ self.userInfo = nil;
[super dealloc];
}
Please sign in to comment.
Something went wrong with that request. Please try again.