Skip to content

Commit

Permalink
Merge pull request #623 from compositeprimes/master
Browse files Browse the repository at this point in the history
Fix trying to set page index to -1
  • Loading branch information
jverkoey committed Sep 14, 2015
2 parents d661bc5 + c10b252 commit 146f1a2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/pagingscrollview/src/NIPagingScrollView.m
Expand Up @@ -491,10 +491,12 @@ - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
}

- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView {
[self didAnimateToPage:_animatingToPageIndex];
if (_animatingToPageIndex >= 0) {
[self didAnimateToPage:_animatingToPageIndex];

if ([self.delegate respondsToSelector:_cmd]) {
[self.delegate scrollViewDidEndScrollingAnimation:scrollView];
if ([self.delegate respondsToSelector:_cmd]) {
[self.delegate scrollViewDidEndScrollingAnimation:scrollView];
}
}
}

Expand Down

0 comments on commit 146f1a2

Please sign in to comment.