Created
December 14, 2010 06:03
-
-
Save marshluca/740058 to your computer and use it in GitHub Desktop.
滚动scrollView的时候,获取当前page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView | |
{ | |
CGFloat pageWidth = galleryScrollView.frame.size.width; | |
int currentPage = floor((galleryScrollView.contentOffset.x - pageWidth / 2) / 320) + 1; | |
[self loadSelectedPage:currentPage]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment