Skip to main content
improved formatting
Source Link
Atural
  • 5.5k
  • 5
  • 21
  • 36

There is nothing like a UIPageControlDelegate but UIScrollViewDelegateUIScrollViewDelegate offers scrollViewDidScrollscrollViewDidScroll for that purpose. Using scrollView.contentOffset.xscrollView.contentOffset.x you can get the current page, assign it to the pageControl.currentPagepageControl.currentPage and update your buttons there.

There is nothing like a UIPageControlDelegate but UIScrollViewDelegate offers scrollViewDidScroll for that purpose. Using scrollView.contentOffset.x you can get the current page, assign it to the pageControl.currentPage and update your buttons there.

There is nothing like a UIPageControlDelegate but UIScrollViewDelegate offers scrollViewDidScroll for that purpose. Using scrollView.contentOffset.x you can get the current page, assign it to the pageControl.currentPage and update your buttons there.

Source Link
MartinM
  • 937
  • 8
  • 14

There is nothing like a UIPageControlDelegate but UIScrollViewDelegate offers scrollViewDidScroll for that purpose. Using scrollView.contentOffset.x you can get the current page, assign it to the pageControl.currentPage and update your buttons there.