Permalink
Browse files

Merge branch 'fix-scrollview-dealloc' of https://github.com/ppaulojr/…

…ODRefreshControl into ppaulojr-fix-scrollview-dealloc

Conflicts:
	ODRefreshControl/ODRefreshControl.m
  • Loading branch information...
2 parents a882a83 + eaa3b55 commit a8ed45777ea6052ae672cf63f191323f2d7175cc @Sephiroth87 committed Aug 21, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 ODRefreshControl/ODRefreshControl.m
View
9 ODRefreshControl/ODRefreshControl.m
@@ -101,6 +101,15 @@ - (void)setEnabled:(BOOL)enabled
_shapeLayer.hidden = !self.enabled;
}
+- (void)willMoveToSuperview:(UIView *)newSuperview
+{
+ [super willMoveToSuperview:newSuperview];
+ if (!newSuperview) {
+ [self.scrollView removeObserver:self forKeyPath:@"contentOffset"];
+ self.scrollView = nil;
+ }
+}
+
- (void)setTintColor:(UIColor *)tintColor
{
_tintColor = tintColor;

0 comments on commit a8ed457

Please sign in to comment.