Skip to content

Instantly share code, notes, and snippets.

@Rich86man
Created July 17, 2012 18:04
Show Gist options
  • Save Rich86man/3130884 to your computer and use it in GitHub Desktop.
Save Rich86man/3130884 to your computer and use it in GitHub Desktop.
UIScrollview page number
CGFloat pageWidth = scrollView.frame.size.width;
int page = floor((scrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment