有一种方法可以从这个方法中获取我当前的页面吗?
-(void)pageViewController:(UIPageViewController *)pvc didFinishAnimating:(BOOL)finished previousViewControllers:(NSArray *)previousViewControllers transitionCompleted:(BOOL)completed –
答案 0 :(得分:0)
这对我有用,感谢Krumelur!
- (void)pageViewController:(UIPageViewController *)pageViewController didFinishAnimating:(BOOL)finished previousViewControllers:(NSArray *)previousViewControllers transitionCompleted:(BOOL)completed
{
if (completed) {
int currentIndex = ((UIViewController *)[self.pageViewController.viewControllers objectAtIndex:0]).view.tag;
self.pageControl.currentPage = currentIndex;
}
}