相关疑难解决方法(0)

向后或向前滑动时检查UIPageViewController

我想用这个跟踪索引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",但我无法检查页面转换是否已完成(我可以在上面的方法中执行此操作)任何想法我怎么知道用户是否向后滑动或进一步以上方法?

iphone objective-c ios

6
推荐指数
2
解决办法
1万
查看次数

标签 统计

ios ×1

iphone ×1

objective-c ×1