Return to Snippet

Revision: 51079
at September 14, 2011 01:11 by rabc


Initial Code
- (void)scrollViewDidScroll:(UIScrollView *)_scrollView
{
	CGFloat pageWidth = _scrollView.frame.size.width;
	
	int page = floor((_scrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1;
	
	self.pageControl.currentPage = page;
}

Initial URL

                                

Initial Description

                                

Initial Title
Set UIPageControll scroll view current page

Initial Tags
page

Initial Language
Objective C