From 4c5f0473ad730512ee49f361e2f03ab2c71c892d Mon Sep 17 00:00:00 2001 From: Richard Hult Date: Sun, 30 Sep 2012 09:42:45 +0200 Subject: [PATCH] No need to use associated objects, just use a regular property For the revealing state. --- vendor/ZKRevealingTableViewCell.m | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/vendor/ZKRevealingTableViewCell.m b/vendor/ZKRevealingTableViewCell.m index 74f954c..91ddf40 100644 --- a/vendor/ZKRevealingTableViewCell.m +++ b/vendor/ZKRevealingTableViewCell.m @@ -61,10 +61,6 @@ @implementation ZKRevealingTableViewCell @synthesize _lastDirection; @synthesize _currentDirection; -#pragma mark - Public Properties - -@dynamic revealing; - #pragma mark - Lifecycle - (void)commonInit @@ -133,10 +129,8 @@ - (void)setRevealing:(BOOL)revealing - (void)_setRevealing:(BOOL)revealing { - [self willChangeValueForKey:@"isRevealing"]; - objc_setAssociatedObject(self, &BOOLRevealing, [NSNumber numberWithBool:revealing], OBJC_ASSOCIATION_RETAIN_NONATOMIC); - [self didChangeValueForKey:@"isRevealing"]; - + _revealing = revealing; + if (self.isRevealing && [self.delegate respondsToSelector:@selector(cellDidReveal:)]) [self.delegate cellDidReveal:self]; }