Getting the current page

There is no UIScrollView property for the current page. You can calculate it with:

int page = scrollView.contentOffset.x / scrollView.frame.size.width;

If you want to round up or down to the nearest page, use:

CGFloat width = scrollView.frame.size.width;
NSInteger page = (scrollView.contentOffset.x + (0.5f * width)) / width;

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)