Permalink
Browse files

Use scrollview delegate method for animated pager update.

  • Loading branch information...
1 parent 272717d commit 45467978cf34688dbd946abb8d3231a396dbc124 @alexleutgoeb alexleutgoeb committed Jul 25, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/Three20UI/Sources/TTLauncherView.m
@@ -740,6 +740,12 @@ - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
///////////////////////////////////////////////////////////////////////////////////////////////////
+- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView {
+ [self updatePagerWithContentOffset:_scrollView.contentOffset];
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark -
#pragma mark UIPageControlDelegate
@@ -917,7 +923,9 @@ - (void)scrollToItem:(TTLauncherItem*)item animated:(BOOL)animated {
NSUInteger page = [path indexAtPosition:0];
CGFloat x = page * _scrollView.width;
[_scrollView setContentOffset:CGPointMake(x, 0) animated:animated];
- [self updatePagerWithContentOffset:CGPointMake(x, 0)];
+ if (!animated) {
+ [self updatePagerWithContentOffset:CGPointMake(x, 0)];
+ }
}
}

0 comments on commit 4546797

Please sign in to comment.