I'm trying to figure out how much of the scroll view inside my UIPageViewController
has been scrolled. I have the following code in the viewLoad that access the UIScrollView
from UIPageViewController
.
for (UIView *view in self.pageViewController.view.subviews)
{
if ([view isKindOfClass:[UIScrollView class]])
{
thisControl = (UIScrollView *)view;
}
}
So once I have the UIScrollView, called thisControl I would like to print how much has been scrolled by doing something like this:
NSLog (@"Scroll: %f",thisControl.contentOffset.x);
The problem, is that I don't really know where to put this line, or how print continuously how much has been scrolled. Any idea?