我想用这个跟踪索引UIPageViewController.每当我刷卡我需要index++或index--.无论何时向后或向后滑动,都会调用此委托方法:
- (void)pageViewController:(UIPageViewController *)pvc didFinishAnimating:(BOOL)finished previousViewControllers:(NSArray *)previousViewControllers transitionCompleted:(BOOL)completed
{
// If the page did not turn
if (!completed)
{
// You do nothing because whatever page you thought
// the book was on before the gesture started is still the correct page
return;
}
// I want to check here whenever the page was swiped back or further
}
Run Code Online (Sandbox Code Playgroud)
如果用户向后或向后滑动,我该如何检查此方法?我知道有2个DataSource方法"viewControllerAfterViewController"和"viewControllerBeforeViewController",但我无法检查页面转换是否已完成(我可以在上面的方法中执行此操作)任何想法我怎么知道用户是否向后滑动或进一步以上方法?