首页 > 代码库 > 保持pageControl与现实图片一致

保持pageControl与现实图片一致

-(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;

}

保持pageControl与现实图片一致