Skip to content
Browse files

fixes for KVO

Signed-off-by: Matthew Wilkinson <matthewwilkinson@MathBook Pro.(none)>
  • Loading branch information...
1 parent f47fcaa commit 25d49619d46a62f45ccc26ba8fd4bae6f6967fb0 Matthew Wilkinson committed with Aug 21, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 ODRefreshControl/ODRefreshControl.m
View
7 ODRefreshControl/ODRefreshControl.m
@@ -28,6 +28,7 @@
@interface ODRefreshControl ()
+@property (nonatomic, readwrite) BOOL refreshing;
@property (nonatomic, assign) UIScrollView *scrollView;
@end
@@ -293,7 +294,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
_activity.layer.transform = CATransform3DMakeScale(1, 1, 1);
} completion:nil];
- _refreshing = YES;
+ self.refreshing = YES;
_canRefresh = NO;
[self sendActionsForControlEvents:UIControlEventValueChanged];
}
@@ -320,15 +321,15 @@ - (void)beginRefreshing
[self.scrollView setContentInset:UIEdgeInsetsMake(kOpenedViewHeight, 0, 0, 0)];
[self.scrollView setContentOffset:offset animated:NO];
- _refreshing = YES;
+ self.refreshing = YES;
_canRefresh = NO;
}
}
- (void)endRefreshing
{
if (_refreshing) {
- _refreshing = NO;
+ self.refreshing = NO;
// Create a temporary retain-cycle, so the scrollView won't be released
// halfway through the end animation.
// This allows for the refresh control to clean up the observer,

0 comments on commit 25d4961

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