我想使用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
}
如果用户向后或进一步滑动,我如何检查此方法?我知道有 2 个 DataSource 方法“viewControllerAfterViewController”和“viewControllerBeforeViewController”,但我无法检查页面转换是否已完成(我可以在上述方法中执行此操作)知道我如何知道用户是否向后滑动或进一步滑动上面的方法?