PageViewController didFinishAnimating多次滑动时未调用。
我有一个功能,可识别用户完成动画扫描,我开始每隔4秒单独移动一页。
有时在最后一次滑动时没有调用完成动画。
-(void)pageViewController:(UIPageViewController *)pageViewController didFinishAnimating:(BOOL)finished previousViewControllers:(NSArray *)previousViewControllers transitionCompleted:(BOOL)completed {
NSLog(@"\n\n\n didFinishAnimating \n\n\n");
_isAnimateWorking = NO;
if(completed){
_currentIndex = _nextIndex;
}
else
{
_currentProduct = prev_currentProduct;
_nextIndex = prev_nextIndex;
}
[self StartMoveAloneTimer];
}
-(void) StartMoveAloneTimer {
if (_myticker == nil) {
_myticker = [NSTimer scheduledTimerWithTimeInterval:4.0f target:self selector:@selector(GoToNextPage) userInfo:nil repeats:YES];
}
}