Permalink
Browse files

Sanity check for view being removed from window

  • Loading branch information...
1 parent 9bc601c commit e7a931a83c79aae802db116a12744ec31ac90a61 @danielamitay committed Apr 1, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 DAAutoScroll/DAAutoScroll.m
@@ -35,6 +35,10 @@ - (void)startScrolling
- (void)incrementAutoScroll
{
+ if (!self.window)
+ {
+ [self stopScrolling];
+ }
CGFloat animationDuration = self.autoScrollTimer.timeInterval;
CGFloat pointChange = self.scrollPointsPerSecond * animationDuration;
CGPoint newOffset = self.contentOffset;

0 comments on commit e7a931a

Please sign in to comment.