Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
- {
- CGFloat pageWidth = self.scrollview.bounds.size.width;
- curIndex = floor((self.scrollview.contentOffset.x - pageWidth / 2) / pageWidth) + 1;
- if (curIndex == lastIndex) return;
- lastIndex = curIndex;
- //increment pager and do whatever else...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement