Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/117.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 检测UIPageViewController开始刷卡_Ios_Swift_Uipageviewcontroller - Fatal编程技术网

Ios 检测UIPageViewController开始刷卡

Ios 检测UIPageViewController开始刷卡,ios,swift,uipageviewcontroller,Ios,Swift,Uipageviewcontroller,我在ViewController中有一个UIPageViewController,它包含一个UICollectionView以指示哪个页面处于打开状态,在didSelectItemAt上,它设置要显示的子VC 当触摸页面视图时,我需要禁用UICollectionView上的交互,这样我处理页面选择的方式就不会中断 我已尝试添加一个UISweepGestureRecognitor,并使用以下方法: override func willTransition(to newCollection: UIT

我在
ViewController
中有一个
UIPageViewController
,它包含一个
UICollectionView
以指示哪个页面处于打开状态,在
didSelectItemAt
上,它设置要显示的子VC

当触摸页面视图时,我需要禁用
UICollectionView
上的交互,这样我处理页面选择的方式就不会中断

我已尝试添加一个
UISweepGestureRecognitor
,并使用以下方法:

override func willTransition(to newCollection: UITraitCollection, with coordinator: UIViewControllerTransitionCoordinator) {
    _delegate?.stopTouches()
}
到目前为止,我还没有找到这样做的方法。 有什么建议吗?

请使用学员

它告诉你手势何时开始,何时结束