In my scroll view, I want to get the current page that’s being displayed (maybe page isn’t the correct term). I can’t find any variable that holds this. But I think it must be held somewhere, since the indicator is able to show which sub-view of the scroll view is currently being displayed.
Is this hidden from us completely or is there a way for me to access it?
There is no
UIScrollViewproperty for the current page. You can calculate it with:If you want to round up or down to the nearest page, use: