-(void)scrollViewDidScroll:(UIScrollView *)scrollView
{
double pageDouble = self.headerScroll.contentOffset.x/self.headerScroll.frame.size.width;
int page = (int)(pageDouble + 0.5);
self.pageControl.currentPage = page;
}
原文:http://www.cnblogs.com/tuhaoYY/p/4081766.html