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;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…