每当刷UIPageView时我都需要执行另一个函数。
答案 0 :(得分:2)
符合similar to Netflix并实施以下方法:
func pageViewController(UIPageViewController, willTransitionTo: [UIViewController]) {
// called when swiping begins
}
func pageViewController(UIPageViewController, didFinishAnimating: Bool, previousViewControllers: [UIViewController], transitionCompleted: Bool) {
// called when swiping ends
}
答案 1 :(得分:1)
查看UIPageViewControllerDelegate。您可能正在寻找pageViewController(_:didFinishAnimating:previousViewControllers:transitionCompleted:)