I'm looking for a reliable way to track the current UIPageViewController index.
The problem is well known; Although viewControllers are displayed correctly, it is difficult to track the current index.
I thought it would be good to update this topic through the SO community, as for some reason it remains unresolved.
I looked at a lot of threads here, but most of the answers are outdated or flagged as unreliable (the result depends on whether the user was executed with a full hit or just half-scrolled, etc.)
I visited this thread, but it does not contain an explicit correct answer.
I tried:
1) Tracking the tag viewController view - link - always returns 0
2) Considering the index variable in both methods UIPageViewController, viewControllerBeforeViewController and viewControllerAfterViewControlle
its results are unpredictable, sometimes it skips one index, etc.
Has anyone come up with a good way, a reliable way to track the UIPageCiewController index to use it (like print index)?
I would appreciate both obj-c and fast implementation, but fast is the one I'm looking for.
ios objective-c swift uipageviewcontroller
DCDC Apr 26 '16 at 6:57 2016-04-26 06:57
source share